again#

Re-arm a repeating timer from now - the way to keep a timeout from firing while there is activity.

Synopsis#

$w->again;        # restart the repeat interval from now
$w->again(10);    # with a new repeat interval

What it does#

  • An active repeating timer: fires the repeat interval after now.

  • An inactive repeating timer: starts, firing the repeat interval after now.

  • An active timer without repeat: stops.

  • Otherwise nothing.

Make the timer with the same first and repeat time (EV::timer 30, 30, ...) and call again on each sign of activity.

Edge cases#

  • A negative new repeat croaks repeat value must be >= 0.

Differences from upstream#

Fully compatible with upstream. Covered by t/81-xs-native/EV/110-upstream-01_timer.t.

See also#

  • remaining - how long until it fires

  • repeat - the repeat interval alone