Formatting for hh:mm:ss

Roy Katz katz at Glue.umd.edu
Tue Dec 26 13:12:33 EST 2000


Hello,


I've searched the 'time' and 'locale' modules  for any function which
would take a difference of two time.time()'s and format the result as
hour:minutes:seconds, but I can't find any.  All I am doing is this:

  t1 = time.time()
  # some processing here
  t2 = time.time()

  total = t2 - t1

  print_time( total )  

where print_time() would format the time as above. Does anyone know if
this function already exists?


Thanks,
Roey




More information about the Python-list mailing list