26.07.2018, 17:07
Quote:
That's WHY I'm saying set a 1 second timer! To be more accurate..
|
Why not do it this way?
PHP код:
task JustARandomTimer[1000]()
{
static pastMinutes = -1;
new hours, minutes, seconds;
gettime(hours, minutes, seconds);
// Initial pastMinutes variable
if (pastMinutes == -1) {
pastMinutes = minutes;
}
if (minutes < 30 && pastMinutes >= 30) {
pastMinutes = 0;
// Do something under xx:30, called once.
}
else if (minutes >= 30 && pastMinutes < 30) {
pastMinutes = 30;
// Do something above xx:30, called once.
}
return 1;
}