Project

General

Profile

« Previous | Next » 

Revision 01ac9b8b

Added by David Sorber over 7 years ago

Ugh; fix typo.

View differences:

software/hbkcd/hbkcd/daemon.py
""" Helper function to calculate the elapsed time between to datetime
objects and return in a readable "HH::MM:SS" string format.
"""
elapsed = dt_end - dt_sart
elapsed = dt_end - dt_start
hours, remainder = divmod(elapsed.total_seconds(), 3600)
minutes, seconds = divmod(remainder, 60)
elapsed_str = '{:02}:{:02}:{:02}'

Also available in: Unified diff