From e4cad8cca4047f4f6da9ef2ac58a30326f64357c Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 22 Oct 2023 20:35:49 -0500 Subject: [PATCH] Update powerwall.sh --- powerwall.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/powerwall.sh b/powerwall.sh index f1e4b021..2599acda 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -176,7 +176,7 @@ CHECKTEMP_SERVICE(){ cw=20 declare -A last_temp while true; do - + start=`date +%s` if [ ! -f ${PW_TMPFOLDER}/temp.* ] && [ $(date +%H)$(date +%M) -ge 0700 ] && [ $(date +%H)$(date +%M) -lt 0705 ]; then if [ ! -f ${PW_TMPFOLDER}/.sentdaily ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.sentdaily)) -gt 600 ]; then touch ${PW_TMPFOLDER}/.sentdaily @@ -383,6 +383,9 @@ Previous Temp: ${last_temp[${SENSOR}]}'F" done + end=`date +%s` + runtime=$((end-start)) + echo "runtime: ${runtime}, pausing for 60secs..." sleep 60 done # &