From 12d8f47d44e1ceb5e6b787272f38f6bdefcce33a Mon Sep 17 00:00:00 2001 From: Julian Hurst Date: Mon, 10 Mar 2025 02:44:39 +0100 Subject: fprint -> error and print final newline to stderr --- timer.ha | 6 +++--- 1 file 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()!; }; -- cgit v1.2.3