mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-20 02:49:49 +01:00
Revert "Timer: minor visual style change"
This reverts commit 2bd034c951
.
This commit is contained in:
parent
2bd034c951
commit
b5fad6c279
@ -184,14 +184,14 @@ sub enqueue_event {
|
||||
my $i = $self->find_enqueue_position($event->{timeout});
|
||||
splice @{$self->{event_queue}}, $i, 0, $event;
|
||||
|
||||
if ($interval < $waitfor) {
|
||||
$self->waitfor($interval);
|
||||
}
|
||||
|
||||
my $debug = $self->{pbot}->{registry}->get_value('timer', 'debug') // 0;
|
||||
if ($debug > 1) {
|
||||
$self->{pbot}->{logger}->log("Enqueued new timer event $id at position $i: timeout=$event->{timeout} interval=$interval repeating=$repeating\n");
|
||||
}
|
||||
|
||||
if ($interval < $waitfor) {
|
||||
$self->waitfor($interval);
|
||||
}
|
||||
}
|
||||
|
||||
sub dequeue_event {
|
||||
@ -290,11 +290,11 @@ sub on_tick_handler {
|
||||
}
|
||||
}
|
||||
|
||||
$self->waitfor($next_tick);
|
||||
|
||||
foreach my $event (@enqueue) {
|
||||
$self->enqueue_event($event->{subref}, $event->{interval}, $event->{id}, 1);
|
||||
}
|
||||
|
||||
$self->waitfor($next_tick);
|
||||
} else {
|
||||
# no queued events, call default overridable on_tick() method if timeout has elapsed
|
||||
if ($seconds - $self->{last} >= $self->{timeout}) {
|
||||
|
Loading…
Reference in New Issue
Block a user