From fcf187d3357d15598245b7444ac383752bd29e13 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Tue, 29 Dec 2020 11:38:36 +0100 Subject: [PATCH] Small cleanup. --- remoteglot.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; -- 2.39.2