From 1eb30f205f776ad812fd6c6c8d81dd666531b8dc Mon Sep 17 00:00:00 2001 From: davidovski Date: Thu, 28 Dec 2023 14:03:30 +0000 Subject: use reverse timer on timed tests --- typr.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/typr.sh b/typr.sh index 82678e6..d1748ca 100755 --- a/typr.sh +++ b/typr.sh @@ -62,6 +62,10 @@ typr_draw_time () { case "$test_type" in "time") time_ns=$((1000000000*$test_length - $time_ns)) + [ "$time_ns" -lt "0" ] && { + [ "$(((time_ns / 500000000) % 2))" = "0" ] && printf "[$((areay - 1));${areax}H%s" " " && return 1 + time_ns=0 + } ;; esac -- cgit v1.2.1