NAME
Reflex::Wakeup - A stand-alone single-shot callback at an absolute time
VERSION
version 0.085
SYNOPSIS
#!/usr/bin/env perl
use warnings;
use strict;
use Reflex::Wakeup;
my @wakeups;
my $ding = 0;
for my $delay (1..5) {
push @wakeups, Reflex::Wakeup->new(
when => time() + $delay,
on_time => sub {
print "got wakeup $delay\n";
@wakeups = () if ++$ding >= @wakeups;
},
);
}
Reflex->run_all();
exit;
DESCRIPTION
Reflex::Wakeup invokes a callback at a specific absolute UNIX epoch time. Wakeup timers may be stopped and reset.
Public Attributes
when
Implemented and documented by "when" in Reflex::Role::Wakeup.
Public Callbacks
on_time
Implemented and documented by "cb_wakeup" in Reflex::Role::Wakeup.
Public Methods
reset
Implemented and documented by "method_reset" in Reflex::Role::Wakeup.
stop
Implemented and documented by "method_stop" in Reflex::Role::Interval.
EXAMPLES
TODO - Many. Link to them.
SEE ALSO
Reflex Reflex::Role Reflex::Role::Interval Reflex::Role::Timeout Reflex::Role::Wakeup Reflex::Interval Reflex::Timeout
"ACKNOWLEDGEMENTS" in Reflex "ASSISTANCE" in Reflex "AUTHORS" in Reflex "BUGS" in Reflex "BUGS" in Reflex "CONTRIBUTORS" in Reflex "COPYRIGHT" in Reflex "LICENSE" in Reflex "TODO" in Reflex