#NEWLINE# def next_time( time_string ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# parsed = list ( time . strptime ( time_string , '%H:%M' ) ) #NEWLINE# #UNINDENT# except ( TypeError , ValueError ) : #NEWLINE# #INDENT# return float ( time_string ) #NEWLINE# #UNINDENT# now = time . localtime ( ) #NEWLINE# current = list ( now ) #NEWLINE# current [ 3 : 6 ] = parsed [ 3 : 6 ] #NEWLINE# current_time = time . time ( ) #NEWLINE# delta = ( time . mktime ( current ) - current_time ) #NEWLINE# if ( delta <= 0.0 ) : #NEWLINE# #INDENT# current [ 2 ] += 1 #NEWLINE# return ( time . mktime ( current ) - current_time ) #NEWLINE# #UNINDENT# return delta