From: Steinar H. Gunderson Date: Tue, 29 Dec 2020 10:38:36 +0000 (+0100) Subject: Small cleanup. X-Git-Url: https://git.sesse.net/?p=remoteglot;a=commitdiff_plain;h=fcf187d3357d15598245b7444ac383752bd29e13 Small cleanup. --- diff --git a/remoteglot.pl b/remoteglot.pl index 455d730..c574ed0 100755 --- a/remoteglot.pl +++ b/remoteglot.pl @@ -650,10 +650,10 @@ sub output { # Don't update too often. my $wait = $remoteglotconf::update_max_interval - Time::HiRes::tv_interval($latest_update); - my $new_pos_wait = defined($pos_calculating_started) ? - $remoteglotconf::update_force_after_move - Time::HiRes::tv_interval($pos_calculating_started) - : 10000.0; - $wait = $new_pos_wait if ($new_pos_wait < $wait); + if (defined($pos_calculating_started)) { + my $new_pos_wait = $remoteglotconf::update_force_after_move - Time::HiRes::tv_interval($pos_calculating_started); + $wait = $new_pos_wait if ($new_pos_wait < $wait); + } if ($wait > 0.0) { $output_timer = AnyEvent->timer(after => $wait + 0.01, cb => \&output); return;