… | |
… | |
342 | | EV::WRITE>, indicating the type of I/O event you want to wait for. If |
342 | | EV::WRITE>, indicating the type of I/O event you want to wait for. If |
343 | you do not want to wait for some I/O event, specify C<undef> for |
343 | you do not want to wait for some I/O event, specify C<undef> for |
344 | C<$fh_or_undef> and C<0> for C<$events>). |
344 | C<$fh_or_undef> and C<0> for C<$events>). |
345 | |
345 | |
346 | If timeout is C<undef> or negative, then there will be no |
346 | If timeout is C<undef> or negative, then there will be no |
347 | timeout. Otherwise a EV::timer with this value will be started. |
347 | timeout. Otherwise an C<EV::timer> with this value will be started. |
348 | |
348 | |
349 | When an error occurs or either the timeout or I/O watcher triggers, then |
349 | When an error occurs or either the timeout or I/O watcher triggers, then |
350 | the callback will be called with the received event set (in general |
350 | the callback will be called with the received event set (in general |
351 | you can expect it to be a combination of C<EV::ERROR>, C<EV::READ>, |
351 | you can expect it to be a combination of C<EV::ERROR>, C<EV::READ>, |
352 | C<EV::WRITE> and C<EV::TIMER>). |
352 | C<EV::WRITE> and C<EV::TIMER>). |
… | |
… | |
710 | time as second argument. |
710 | time as second argument. |
711 | |
711 | |
712 | I<This callback MUST NOT stop or destroy this or any other periodic |
712 | I<This callback MUST NOT stop or destroy this or any other periodic |
713 | watcher, ever, and MUST NOT call any event loop functions or methods>. If |
713 | watcher, ever, and MUST NOT call any event loop functions or methods>. If |
714 | you need to stop it, return 1e30 and stop it afterwards. You may create |
714 | you need to stop it, return 1e30 and stop it afterwards. You may create |
715 | and start a C<EV::prepare> watcher for this task. |
715 | and start an C<EV::prepare> watcher for this task. |
716 | |
716 | |
717 | It must return the next time to trigger, based on the passed time value |
717 | It must return the next time to trigger, based on the passed time value |
718 | (that is, the lowest time value larger than or equal to to the second |
718 | (that is, the lowest time value larger than or equal to to the second |
719 | argument). It will usually be called just before the callback will be |
719 | argument). It will usually be called just before the callback will be |
720 | triggered, but might be called at other times, too. |
720 | triggered, but might be called at other times, too. |