diff --git a/inc/status.inc b/inc/status.inc index 76fb92d1..6cff9547 100755 --- a/inc/status.inc +++ b/inc/status.inc @@ -796,10 +796,15 @@ STATUS_SCANTIMES(){ done average=$(ROUND_NUMBER $(bc <<< "scale=2; ${scantimes_total}/${scansfound}") 0) - + cw=20 + average_disp=$(SHOW_TIME ${average} s); c=0; spca=''; spc1=${cw}-${#average_disp} + until [ $c = ${spc1} ]; do spca="${spca} "; c=`expr $c + 1`; done + lastscantime_disp=$(SHOW_TIME ${lastscantime} s); c=0; spcb=''; spc1=${cw}-${#lastscantime_disp} + until [ $c = ${spc1} ]; do spca="${spca} "; c=`expr $c + 1`; done + 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]}Last Scan Time : ${idsCL[Green]}$(SHOW_TIME ${lastscantime} s) (${lastscantime}s)${idsCL[Default]}\n" + echo -e "${idsCL[LightCyan]}Average for last '${scansfound}' : ${idsCL[Green]}${average_disp}${spca}(${average}s)${idsCL[Default]}\n" + echo -e "${idsCL[LightCyan]}Last Scan Time : ${idsCL[Green]}$(SHOW_TIME ${lastscantime} s)${spcb}(${lastscantime}s)${idsCL[Default]}\n" echo -en "${idsCL[LightCyan]}List out these scan times? (y/N): ${idsCL[Default]}" read -n1 choice