aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/show.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/show.ts b/src/show.ts
index ed8eb3f..a088955 100644
--- a/src/show.ts
+++ b/src/show.ts
@@ -13,6 +13,7 @@ export function metric(x: number, unit = ""): string {
export function duration(t: number): string {
if (t < 0) return "-" + duration(-t)
+ if (t > 1e6) return "a long time"
let h = 0, m = 0, s = 0;
while (t > 3600) t -= 3600, h++;
while (t > 60) t -= 60, m++;