Timing Doubt


Recommended Posts

Hi, I have a doubt, I need to start "x" sequence when the system time every 5 minutes, for example when the time 1:00, 1:05, 1:10, etc...How I can do that?, I try with a loop while, but my system going very slow, I hope sombody support me!! :lol:

Link to comment
Share on other sites

If your system goes slow it is probably because you made an infinite loop without any delay() in it. Here's how you do what you want:

private nexttime = floor(systime() / 300) * 300 + 300
// nexttime is now the next even 5 minute mark.  300 is 5 minutes in seconds.  To do, say 10 minutes, change to 600.
   nexttime += 300

Link to comment
Share on other sites


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