Python: elapsed_time (human readable time span given total seconds)


/ Published in: Python
Save to your folder(s)

This function takes an amount of time in seconds and returns a human readable time span (i.e., 4h 5m 23s). The suffixes (d for day, h for hour) are configurable to whatever you want (like day, hour, week, etc). Read the comments within the code for more detail.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.