summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Hurst <ark@mansus.space>2025-03-10 02:44:39 +0100
committerJulian Hurst <ark@mansus.space>2025-03-10 02:44:39 +0100
commit12d8f47d44e1ceb5e6b787272f38f6bdefcce33a (patch)
treea956dbf957131d492b30663b9be5ad30e79feb0f
parentf1fb012d8ca7093bf80a794fd387a88412e7a648 (diff)
downloadtimer-12d8f47d44e1ceb5e6b787272f38f6bdefcce33a.tar.gz
fprint -> error and print final newline to stderr
-rw-r--r--timer.ha6
1 files changed, 3 insertions, 3 deletions
diff --git a/timer.ha b/timer.ha
index c4988bd..3c51c11 100644
--- a/timer.ha
+++ b/timer.ha
@@ -23,10 +23,10 @@ fn print_countdown(instant: time::instant) bool = {
const currentduration = time::diff(tn, instant);
// man page console_codes(4) is useful
- fmt::fprint(os::stderr, "\x1B[1K\r")!;
+ fmt::error("\x1B[1K\r")!;
const count = human_readable(currentduration);
defer free(count);
- fmt::fprint(os::stderr, count)!;
+ fmt::error(count)!;
return currentduration <= 0;
};
@@ -160,5 +160,5 @@ export fn main() void = {
ev::timer_configure(f, 1 * time::SECOND, 1 * time::SECOND);
for (ev::dispatch(&loop, -1)!) void;
- fmt::println()!;
+ fmt::errorln()!;
};