Update status.inc

This commit is contained in:
2023-12-03 22:56:12 -06:00
parent d5fd8fe21f
commit e24c412e14

View File

@@ -775,13 +775,13 @@ STATUS_SCANTIMES(){
scantimes=($(tail -n ${LAST} ${NM_LOGFOLDER}/status-check.scantimes))
scantimes_total=0; scansfound=0
for scantime in "${scantimes[@]}"; do
scantimes_total=$(bc <<< "scale=1; ${scantimes_total}+${scantime}")
scantimes_total=$(bc <<< "scale=2; ${scantimes_total}+${scantime}")
((scansfound++))
done
average=$(bc <<< "scale=1; ${scantimes_total}/${scansfound}")
average=$(bc <<< "scale=2; ${scantimes_total}/${scansfound}")
echo -en "\r\033[K"
echo -e "${idsCL[LightCyan]}Average scan time for the last '${scansfound}' scans : ${idsCL[Green]}${average}${idsCL[Default]}\n"
echo -e "${idsCL[LightCyan]}Average scan time for the last '${scansfound}' scans : ${idsCL[Green]}$(SHOW_TIME ${average})${idsCL[Default]}\n"
}