summaryrefslogtreecommitdiff
path: root/timer.ha
diff options
context:
space:
mode:
authorJulian Hurst <ark@mansus.space>2025-03-01 16:32:07 +0100
committerJulian Hurst <ark@mansus.space>2025-03-01 16:32:07 +0100
commit37dd76e388aca5539dd73b6e897867e120529537 (patch)
tree577e534d60e4189c6e52ab04cc0fcf5816fccc9c /timer.ha
parent8dbcb04ce93dd32e80c37da3ca2c486802213858 (diff)
downloadtimer-37dd76e388aca5539dd73b6e897867e120529537.tar.gz
Add useful comment for console codes
Diffstat (limited to 'timer.ha')
-rw-r--r--timer.ha1
1 files changed, 1 insertions, 0 deletions
diff --git a/timer.ha b/timer.ha
index 016519a..d3b5c62 100644
--- a/timer.ha
+++ b/timer.ha
@@ -16,6 +16,7 @@ fn timer_handler(file: *ev::file) void = {
const tn = time::now(time::clock::MONOTONIC);
const currentduration = time::diff(tn, t);
+ // man page console_codes(4) is useful
fmt::fprint(os::stderr, "\x1B[1K\r")!;
fmt::fprint(os::stderr, math::ceilf64(currentduration: f64 / time::SECOND: f64): u64)!;
if (currentduration <= 0) {