friendly timer display of seconds like 01:03:34

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

  1. caching parsed templates by forgems 5 years, 5 months ago
  2. Faster pagination / model object seeking (10x faster infact :o) for larger datasets (500k +) by sleepycal 2 years, 5 months ago
  3. SplitSelectDateTimeWidget by bradmontgomery 4 years, 6 months ago
  4. Function decorator for caching function results in local memory by bikeshedder 7 months, 4 weeks ago
  5. Custom model field for mysql time type. by xuqingkuang 3 years, 7 months ago

Comments

(Forgotten your password?)