mirror of https://github.com/pragma-/pbot.git
EventQueue: Rename do_next_event() to do_events()
This commit is contained in:
parent
7d91eb1c6f
commit
cf3ca4e815
|
@ -322,9 +322,9 @@ sub duration_until_next_event {
|
||||||
return $self->{event_queue}->[0]->{timeout} - time;
|
return $self->{event_queue}->[0]->{timeout} - time;
|
||||||
}
|
}
|
||||||
|
|
||||||
# invokes the next event, if ready, and then returns seconds until next event
|
# invokes the current events and then returns seconds until next upcoming event
|
||||||
|
|
||||||
sub do_next_event {
|
sub do_events {
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
|
|
||||||
# early-return if no events available
|
# early-return if no events available
|
||||||
|
|
|
@ -335,8 +335,8 @@ sub do_one_loop {
|
||||||
# do an irc engine loop (select, eventqueues, etc)
|
# do an irc engine loop (select, eventqueues, etc)
|
||||||
$self->{irc}->do_one_loop;
|
$self->{irc}->do_one_loop;
|
||||||
|
|
||||||
# check for an available PBot event (returns seconds until next event)
|
# invoke PBot events (returns seconds until next event)
|
||||||
my $waitfor = $self->{event_queue}->do_next_event;
|
my $waitfor = $self->{event_queue}->do_events;
|
||||||
|
|
||||||
# tell irc select loop to sleep for this many seconds
|
# tell irc select loop to sleep for this many seconds
|
||||||
# (or until its own internal eventqueue has an event)
|
# (or until its own internal eventqueue has an event)
|
||||||
|
|
Loading…
Reference in New Issue