Recommended Posts

In a sequence:

private nexttime = floor(systime() / 86400) * 86400 + 8 * 3600
if (nexttime < systime())
   nexttime += 86400
while (1)
   nexttime += 86400
   // do your stuff here

floor(systime()/86400) * 86400 gets you midnight today. Add 8*3600 and you get 8am. Then we check to make sure its not 8am yet, and if it is, we add a day so we wait until tomorrow. The rest is just waiting and looping.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.