… | |
… | |
682 | surpasses this time. |
682 | surpasses this time. |
683 | |
683 | |
684 | =item * repeating interval timer ($interval > 0, $reschedule_cb = 0) |
684 | =item * repeating interval timer ($interval > 0, $reschedule_cb = 0) |
685 | |
685 | |
686 | In this mode the watcher will always be scheduled to time out at the |
686 | In this mode the watcher will always be scheduled to time out at the |
687 | next C<$at + N * $interval> time (for some integer N) and then repeat, |
687 | next C<$at + N * $interval> time (for the lowest integer N) and then repeat, |
688 | regardless of any time jumps. |
688 | regardless of any time jumps. Note that, since C<N> can be negative, the |
|
|
689 | first trigger can happen before C<$at>. |
689 | |
690 | |
690 | This can be used to create timers that do not drift with respect to system |
691 | This can be used to create timers that do not drift with respect to system |
691 | time: |
692 | time: |
692 | |
693 | |
693 | my $hourly = EV::periodic 0, 3600, 0, sub { print "once/hour\n" }; |
694 | my $hourly = EV::periodic 0, 3600, 0, sub { print "once/hour\n" }; |