From 46dc0722229aa8468a01642151300df007eea271 Mon Sep 17 00:00:00 2001 From: davidovski Date: Wed, 27 Dec 2023 19:30:19 +0000 Subject: fix wpm calculation --- typr.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'typr.sh') diff --git a/typr.sh b/typr.sh index c45a25d..cb404aa 100755 --- a/typr.sh +++ b/typr.sh @@ -106,7 +106,7 @@ typr_show_results () { time_ns=$((now-start)) words="$(set -- $text ; printf "%s" "$#")" - wpm="$((time_ns*words/60000000000))" + wpm="$((words*60000000000/time_ns))" acc="$(typr_calculate_acc)" printf "[%s;${areax}H%s" \ @@ -189,7 +189,7 @@ typr_main () { while true; do case "$(tty_readc)" in - ' '|'') break;; + ''|'') break;; esac done } -- cgit v1.2.1