use Moo;
# this is ro because we only actually set it using local in sub run
-
has is_running => (is => 'ro', clearer => 'stop');
#maximum duration that select() will block - undef means indefinite,
#0 means no blocking, otherwise maximum time in seconds
} elsif (exists($watch{after})) {
$at = time() + $watch{after};
} elsif (exists($watch{at})) {
- $at = $watch{at};
+ $at = $watch{at};
} else {
- die "watch_time requires every, after or at";
+ die "watch_time requires every, after or at";
}
die "watch_time requires code" unless my $code = $watch{code};
sub unwatch_time {
my ($self, $id) = @_;
- log_debug { "Removing timer with id of '$id'" };
+ log_trace { "Removing timer with id of '$id'" };
@$_ = grep !($_ eq $id), @$_ for $self->_timers;
return;
}