def time2float(line):
    """ converts formatted time 'nn:nn:nn:nnnnn' to float
    >>> time2float('21:33:25:5342')
    77605.005342000004
    """
    spline = line.split(':')
    ints = [int(spline[i]) for i in range(4)]
    result = 3600*ints[0] + 60*ints[1] + ints[2] + 1E-6*ints[3]
    return result