Changeset 97:f885322fb296 for src/mlx/util.py
- Timestamp:
- 04/21/12 14:49:45 (12 years ago)
- Branch:
- default
- hg-Phase:
- (<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/util.py
r89 r97 2 2 3 3 import math 4 import time 4 5 5 6 #------------------------------------------------------------------------------ … … 75 76 #------------------------------------------------------------------------------ 76 77 78 def getTimestampString(timestamp): 79 """Get the string representation of the given timestamp.""" 80 return time.strftime("%H:%M:%S", time.gmtime(timestamp)) 81 82 #------------------------------------------------------------------------------ 83 77 84 def getTimeIntervalString(seconds): 78 85 """Get a more human-friendly representation of the given time interval … … 81 88 minutes = int((seconds / 60) % 60) 82 89 seconds = int(seconds % 60) 83 return "% d:%02d:%02d" % (hours, minutes, seconds)90 return "%02d:%02d:%02d" % (hours, minutes, seconds) 84 91 85 92 #------------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.