Update status.inc

This commit is contained in:
2023-12-03 22:45:29 -06:00
parent e343526124
commit a890795aec

View File

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