Subject: | IO::Async::Timer::Countdown ->expired, remove_on_expire |
Consider adding the following API:
my $timer = IO::Async::Timer::Countdown->new(
...
remove_on_expire => 1,
);
...
if( $timer->expired ) { ... }
remove_on_expire true would ->remove the timer from its containing loop
or parent object once it expires.
->expired would return true once the timer has expired.
In combination: retaining a reference to the timer object would hold on
to it to allow inspection of the ->expired state, even after it has
expired and in fact been removed from the container anyway.
--
Paul Evans