Update status.inc

This commit is contained in:
2023-12-05 21:58:04 -06:00
parent 7b426a28e7
commit a4076bde17

View File

@@ -794,12 +794,11 @@ STATUS_SCANTIMES(){
scantimes_total=$(bc <<< "scale=2; ${scantimes_total}+${scantime}")
((scansfound++))
done
average=$(bc <<< "scale=2; ${scantimes_total}/${scansfound}")
# average=$(echo ${average} | awk '{print int($average+0.5)}')
average=$(ROUND_NUMBER $(bc <<< "scale=2; ${scantimes_total}/${scansfound}") 2)
echo -en "\r\033[K"
echo -e "${idsCL[LightCyan]}Average for last '${scansfound}' : ${idsCL[Green]}$(SHOW_TIME ${average} s) (${average}s)${idsCL[Default]}\n"
echo -e "${idsCL[LightCyan]}Average for last '${scansfound}' : ${idsCL[Green]}$(SHOW_TIME ${average} s) (${average}s) - $(bc <<< "scale=2; ${scantimes_total}/${scansfound}")${idsCL[Default]}\n"
echo -e "${idsCL[LightCyan]}Last Scan Time : ${idsCL[Green]}$(SHOW_TIME ${lastscantime} s) (${lastscantime}s)${idsCL[Default]}\n"
echo -e "${idsCL[LightCyan]}Last 10 Scan Times\n${idsCL[Green]}---------------------------------${idsCL[Default]}"
for scantime in "${lastten_scantimes[@]}"; do