METHODS

begin

Increment active event counter, the returned callback can be used to decrement the active event counter again. Arguments passed to the callback are queued in the right order for the next step or finish event and wait method, the first argument will be ignored by default.

steps

$delay = $delay->steps(sub {...}, sub {...});

Sequentialize multiple events, the first callback will run right away, and the next one once the active event counter reaches zero. This chain will continue until there are no more callbacks, a callback does not increment the active event counter or an error occurs in a callback.

wait

my $arg = $delay->wait;
my @args = $delay->wait;

Start ioloop and stop it again once an error or finish event gets emitted, only works when ioloop is not running already.