1 2 3 4 5 | def friendly_seconds(n):
mins = n/60%60
hours = n/(60*60)
seconds = n%60
return "%02d:%02d:%02d" % (hours, mins, seconds)
|
More like this
- caching parsed templates by forgems 5 years, 6 months ago
- Faster pagination / model object seeking (10x faster infact :o) for larger datasets (500k +) by sleepycal 2 years, 6 months ago
- SplitSelectDateTimeWidget by bradmontgomery 4 years, 7 months ago
- Function decorator for caching function results in local memory by bikeshedder 8 months, 3 weeks ago
- Custom model field for mysql time type. by xuqingkuang 3 years, 7 months ago
Comments