… | |
… | |
682 | time: |
682 | time: |
683 | |
683 | |
684 | my $hourly = EV::periodic 0, 3600, 0, sub { print "once/hour\n" }; |
684 | my $hourly = EV::periodic 0, 3600, 0, sub { print "once/hour\n" }; |
685 | |
685 | |
686 | That doesn't mean there will always be 3600 seconds in between triggers, |
686 | That doesn't mean there will always be 3600 seconds in between triggers, |
687 | but only that the the clalback will be called when the system time shows a |
687 | but only that the the callback will be called when the system time shows a |
688 | full hour (UTC). |
688 | full hour (UTC). |
689 | |
689 | |
690 | Another way to think about it (for the mathematically inclined) is that |
690 | Another way to think about it (for the mathematically inclined) is that |
691 | EV::periodic will try to run the callback in this mode at the next |
691 | EV::periodic will try to run the callback in this mode at the next |
692 | possible time where C<$time = $at (mod $interval)>, regardless of any time |
692 | possible time where C<$time = $at (mod $interval)>, regardless of any time |