diff --git a/inc/status.inc b/inc/status.inc index 033087b9..6dad4480 100755 --- a/inc/status.inc +++ b/inc/status.inc @@ -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