fixes intervals

This commit is contained in:
olli 2024-02-06 13:49:55 +01:00
parent a83247b4ca
commit c07fa6a98f

View File

@ -49,8 +49,8 @@ do
rm -f firstloop
else
LOOP_INTERVAL=30 # 60s max free coingecko API interval + 30s puffer
time_to_full_interval=$((${INTERVAL} - $(date +%s) % ${INTERVAL}))
time_to_interval=$((${LOOP_INTERVAL} - $(date +%s) % ${LOOP_INTERVAL}))
time_to_full_interval=$((${INTERVAL} - $(date +%s) % ${INTERVAL}))
# Check for next general interval
g_echo_note "NEXT LOOP in ${time_to_interval} seconds (Interval=${LOOP_INTERVAL}s)"
g_echo_note "NEXT FULL LOOP in ${time_to_full_interval} seconds (Interval=${INTERVAL}s)"