def time_to_seconds(x):
 if isinstance(x, time):
  return (((((((x.hour * 60) + x.minute) * 60) + x.second) * (10 ** 6)) + x.microsecond) / (10 ** 6))
 if is_str(x):
  return x
 return (x and max(0, min(x, ((24 * 3600) - (10 ** (-6))))))

def time_to_seconds ( x ) : if isinstance ( x , time ) : return ( ( ( ( ( ( ( x . hour * 60 ) + x . minute ) * 60 ) + x . second ) * ( 10 ** 6 ) ) + x . microsecond ) / ( 10 ** 6 ) ) if is_str ( x ) : return x return ( x and max ( 0 , min ( x , ( ( 24 * 3600 ) - ( 10 ** ( - 6 ) ) ) ) ) )
convert a time in a seconds sum .