… | |
… | |
1619 | |
1619 | |
1620 | =over 4 |
1620 | =over 4 |
1621 | |
1621 | |
1622 | =item ev_periodic_init (ev_periodic *, callback, ev_tstamp at, ev_tstamp interval, reschedule_cb) |
1622 | =item ev_periodic_init (ev_periodic *, callback, ev_tstamp at, ev_tstamp interval, reschedule_cb) |
1623 | |
1623 | |
1624 | =item ev_periodic_set (ev_periodic *, ev_tstamp after, ev_tstamp repeat, reschedule_cb) |
1624 | =item ev_periodic_set (ev_periodic *, ev_tstamp at, ev_tstamp interval, reschedule_cb) |
1625 | |
1625 | |
1626 | Lots of arguments, lets sort it out... There are basically three modes of |
1626 | Lots of arguments, lets sort it out... There are basically three modes of |
1627 | operation, and we will explain them from simplest to most complex: |
1627 | operation, and we will explain them from simplest to most complex: |
1628 | |
1628 | |
1629 | =over 4 |
1629 | =over 4 |
… | |
… | |
1671 | ignored. Instead, each time the periodic watcher gets scheduled, the |
1671 | ignored. Instead, each time the periodic watcher gets scheduled, the |
1672 | reschedule callback will be called with the watcher as first, and the |
1672 | reschedule callback will be called with the watcher as first, and the |
1673 | current time as second argument. |
1673 | current time as second argument. |
1674 | |
1674 | |
1675 | NOTE: I<This callback MUST NOT stop or destroy any periodic watcher, |
1675 | NOTE: I<This callback MUST NOT stop or destroy any periodic watcher, |
1676 | ever, or make ANY event loop modifications whatsoever>. |
1676 | ever, or make ANY other event loop modifications whatsoever>. |
1677 | |
1677 | |
1678 | If you need to stop it, return C<now + 1e30> (or so, fudge fudge) and stop |
1678 | If you need to stop it, return C<now + 1e30> (or so, fudge fudge) and stop |
1679 | it afterwards (e.g. by starting an C<ev_prepare> watcher, which is the |
1679 | it afterwards (e.g. by starting an C<ev_prepare> watcher, which is the |
1680 | only event loop modification you are allowed to do). |
1680 | only event loop modification you are allowed to do). |
1681 | |
1681 | |