mirror of
https://github.com/rr-/pq-cli.git
synced 2026-09-29 06:44:00 -06:00
ui: show >24h as days
This commit is contained in:
@@ -12,7 +12,10 @@ def format_timespan(timespan: datetime.timedelta) -> str:
|
||||
if num < 60.0:
|
||||
return f"~{int(num)}m"
|
||||
num /= 60
|
||||
if num < 24.0:
|
||||
return f"~{num:.01f}h"
|
||||
num /= 24
|
||||
return f"~{num:.01f}d"
|
||||
|
||||
|
||||
class CustomProgressBar(urwid.Widget):
|
||||
|
||||
Reference in New Issue
Block a user