| Total Complexity | 2 |
| Total Lines | 9 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | from datetime import timedelta |
||
| 2 | |||
| 3 | |||
| 4 | def timer_to_str(timer: timedelta) -> str: |
||
| 5 | if timer.total_seconds() < 0.0: |
||
| 6 | return "-0:00:{:04.1f}".format(timer.total_seconds() * -1.0) |
||
| 7 | else: |
||
| 8 | return str(timer)[:9] |
||
| 9 |