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 4 years, 2 months ago
  2. HTML color code field by b23 3 years, 7 months ago
  3. BabelMiddleware by skam 4 years, 6 months ago
  4. CSV to JSON Fixture by briangershon 2 years, 6 months ago
  5. enani by andisthermal 1 year ago

Comments

(Forgotten your password?)