def racenameanddur(eventname):
    """
    get race name and duration 
    
    :param eventname: eventname from untrasignup.com
    :rtype: racename, duration
    """
    racetext = eventname.strip()
    fields = racetext.split('-')
    racename = racetext
    durfield = fields[-1].strip()
    dur = 0
    startunits = 0
    for digit in durfield:
        if not digit.isdigit():
            break
        dur *= 10
        dur += int(digit)
        startunits += 1
    units = durfield[startunits:]
    if units == 'hrs':
        duration = dur
    else:
        duration = None
    return racename, duration
