Command queue no longer delays commands relative to each other

This commit is contained in:
Pragmatic Software 2016-07-01 13:29:26 -07:00
parent b03a4b68e6
commit 949dc14525
1 changed files with 1 additions and 6 deletions

View File

@ -394,12 +394,7 @@ sub process_output_queue {
sub add_to_command_queue {
my ($self, $channel, $command, $delay) = @_;
if (exists $self->{command_queue}->{$channel}) {
my $last_when = $self->{command_queue}->{$channel}->[-1]->{when};
$command->{when} = $last_when + $delay;
} else {
$command->{when} = gettimeofday + $delay;
}
$command->{when} = gettimeofday + $delay;
push @{$self->{command_queue}->{$channel}}, $command;
}