delu.Timer.format¶
- Timer.format(format_str)[source]¶
Format the time elapsed since the start in a human-readable string.
- Parameters
format_str (str) – the format string passed to
time.strftime
- Returns
Filled
format_str
.- Return type
Examples
timer = Timer() timer.add(3661) assert timer.format('%Hh %Mm %Ss') == '01h 01m 01s'