OUTPUT:
RETVAL
+# deprecated
NV
timer::at ()
CODE:
- RETVAL = THIS->at;
+ RETVAL = THIS->remaining () + ev_now ();
OUTPUT:
RETVAL
RETVAL
IOM_CHAINED
-timer::set (NV tstamp)
+timer::set (NV tstamp, NV repeat = THIS->repeat)
CODE:
- THIS->set (tstamp);
+ THIS->set (tstamp, repeat);
OUTPUT:
RETVAL
IOM_CHAINED
-timer::start (NV tstamp = ev::now ())
+timer::start (NV tstamp = ev::now (), NV repeat = THIS->repeat)
CODE:
- THIS->start (tstamp - ev::now ());
+ THIS->start (tstamp - ev::now (), repeat);
OUTPUT:
RETVAL
IOM_CHAINED
-timer::after (NV delay)
+timer::after (NV delay, NV repeat = THIS->repeat)
CODE:
- THIS->start (delay);
+ THIS->start (delay, repeat);
OUTPUT:
RETVAL
urxvt::timer
->new
- ->after ($arg{after})
- ->interval ($arg{interval})
- ->start
- ->cb ($argv{interval} ? $cb : sub {
+ ->after ($arg{after}, $arg{interval})
+ ->cb ($arg{interval} ? $cb : sub {
$_[0]->stop; # need to cancel manually
$cb->();
})
Set the callback to be called when the timer triggers.
-=item $tstamp = $timer->at
-
-Return the time this watcher will fire next.
-
-=item $timer = $timer->set ($tstamp)
+=item $timer = $timer->set ($tstamp[, $interval])
-Set the time the event is generated to $tstamp.
+Set the time the event is generated to $tstamp (and optionally specifies a
+new $interval).
=item $timer = $timer->interval ($interval)
-Normally (and when C<$interval> is C<0>), the timer will automatically
+By default (and when C<$interval> is C<0>), the timer will automatically
stop after it has fired once. If C<$interval> is non-zero, then the timer
is automatically rescheduled at the given intervals.
Start the timer.
-=item $timer = $timer->start ($tstamp)
+=item $timer = $timer->start ($tstamp[, $interval])
-Set the event trigger time to C<$tstamp> and start the timer.
+Set the event trigger time to C<$tstamp> and start the timer. Optionally
+also replaces the interval.
-=item $timer = $timer->after ($delay)
+=item $timer = $timer->after ($delay[, $interval])
Like C<start>, but sets the expiry timer to c<urxvt::NOW + $delay>.