… | |
… | |
562 | |
562 | |
563 | NOTE: I<This callback MUST NOT stop or destroy the periodic or any other |
563 | NOTE: I<This callback MUST NOT stop or destroy the periodic or any other |
564 | periodic watcher, ever, or make any event loop modifications>. If you need |
564 | periodic watcher, ever, or make any event loop modifications>. If you need |
565 | to stop it, return C<now + 1e30> (or so, fudge fudge) and stop it afterwards. |
565 | to stop it, return C<now + 1e30> (or so, fudge fudge) and stop it afterwards. |
566 | |
566 | |
567 | Also, I<<this callback must always return a time that is later than the |
567 | Also, I<< this callback must always return a time that is later than the |
568 | passed C<now> value >>. Not even C<now> itself will be ok. |
568 | passed C<now> value >>. Not even C<now> itself will be ok. |
569 | |
569 | |
570 | Its prototype is c<ev_tstamp (*reschedule_cb)(struct ev_periodic *w, |
570 | Its prototype is C<ev_tstamp (*reschedule_cb)(struct ev_periodic *w, |
571 | ev_tstamp now)>, e.g.: |
571 | ev_tstamp now)>, e.g.: |
572 | |
572 | |
573 | static ev_tstamp my_rescheduler (struct ev_periodic *w, ev_tstamp now) |
573 | static ev_tstamp my_rescheduler (struct ev_periodic *w, ev_tstamp now) |
574 | { |
574 | { |
575 | return now + 60.; |
575 | return now + 60.; |