Update status.inc

This commit is contained in:
2023-12-03 22:41:48 -06:00
parent 0efcdbd0c5
commit 2f4e2ccffe

View File

@@ -769,10 +769,19 @@ STATUS_SCANTIMES(){
shift
done
[ "${LAST}" == "" ] && LAST=480
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
for scantime in "${scantimes[@]}"; do
echo "HERE: $scantime"
scantimes_total=((${scantimes_total}+${scantime}))
done
average=$(bc <<< "scale=1; ${scantimes_total}/${LAST}")
echo -en "\r\033[K"
echo -e "${idsCL[LightCyan]}Average scan time for the last '${LAST}' scans : ${idsCL[Green]}${average}${idsCL[Default]}\n"
}