diff options
author | metamuffin <metamuffin@disroot.org> | 2025-04-21 09:45:35 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-04-25 18:45:49 +0200 |
commit | 26b8e17daac3ef21d97c25e55c0812bc9e592862 (patch) | |
tree | 8b68d15e71163d0fc034d59e5fad75b8a8c00425 | |
parent | ef36d50d7858a56cbc08bfb4f272bab9476bb977 (diff) | |
download | jshelper-26b8e17daac3ef21d97c25e55c0812bc9e592862.tar jshelper-26b8e17daac3ef21d97c25e55c0812bc9e592862.tar.bz2 jshelper-26b8e17daac3ef21d97c25e55c0812bc9e592862.tar.zst |
-rw-r--r-- | src/show.ts | 1 |
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++; |