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 +}