Promised::Timer - Timer promise
use Promised::Timer;
Promised::Timer->timeout (3)->then (sub {
warn "3s elapsed";
});
The Promised::Timer
module defines a timer promise function.
There is the following method:
- $promise = Promised::Timer->timeout ($time)
-
Return a Promise object, which is resolved with
undef
after at least the specified number of seconds have passed.
The module requires Promise <https://github.com/wakaba/perl-promise> and AnyEvent.
Wakaba <wakaba@suikawiki.org>.
Copyright 2015 Wakaba <wakaba@suikawiki.org>.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.