add lower bound

This commit is contained in:
stryan 2022-04-01 11:31:32 -04:00
parent a2adba3b3d
commit d3e337aa25
1 changed files with 3 additions and 0 deletions

View File

@ -123,6 +123,9 @@ bot.run(true)
logger.info("Starting bot main loop")
loop do
timer = Astro::Moon.phase.phase * (3600 * (1 + rand(3)))
if timer < 900 #lower limit of 15 minutes
timer = 900
end
logger.info("sleeping for #{timer} seconds")
sleep timer
t = Time.new