From 19cef9a556822727d4ac14f96c22fff1332bf853 Mon Sep 17 00:00:00 2001 From: ale Date: Sun, 4 Oct 2020 17:22:09 +0200 Subject: [PATCH] wheel process --- lib/resources.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/resources.sh b/lib/resources.sh index b4eddf9..6462e9b 100644 --- a/lib/resources.sh +++ b/lib/resources.sh @@ -98,6 +98,11 @@ function wheel() { while $1; do printf '%.1s\b' "$sp" sp=${sp#?}${sp%???} - sleep 0.1s + if [ -x "$(command -v bc)" ] + then + sleep $(echo "0.0001*$(grep 'cpu MHz' /proc/cpuinfo | head -n1 | awk '{print $4}')" | bc -l)s + else + sleep 0.2s + fi done -} \ No newline at end of file +}