… | |
… | |
558 | to system time: |
558 | to system time: |
559 | |
559 | |
560 | my $hourly = EV::periodic 0, 3600, 0, sub { print "once/hour\n" }; |
560 | my $hourly = EV::periodic 0, 3600, 0, sub { print "once/hour\n" }; |
561 | |
561 | |
562 | That doesn't mean there will always be 3600 seconds in between |
562 | That doesn't mean there will always be 3600 seconds in between |
563 | triggers, but only that the the clalback will be called when the |
563 | triggers, but only that the the callback will be called when the |
564 | system time shows a full hour (UTC). |
564 | system time shows a full hour (UTC). |
565 | |
565 | |
566 | Another way to think about it (for the mathematically inclined) |
566 | Another way to think about it (for the mathematically inclined) |
567 | is that EV::periodic will try to run the callback in this mode |
567 | is that EV::periodic will try to run the callback in this mode |
568 | at the next possible time where "$time = $at (mod $interval)", |
568 | at the next possible time where "$time = $at (mod $interval)", |