From 5219e9d39df809e9718b238bdc197ed77a7b82de Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Tue, 5 Jan 2016 09:43:13 +0100 Subject: [PATCH] Warn about huge clock ticks only if there are time-outs --- sndiod/file.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sndiod/file.c b/sndiod/file.c index a00698b..b9a4625 100644 --- a/sndiod/file.c +++ b/sndiod/file.c @@ -419,12 +419,14 @@ file_poll(void) if (delta_nsec < 0) log_puts("file_poll: negative time interval\n"); #endif - file_ts = ts; - if (delta_nsec >= 0 && delta_nsec < 1000000000LL) - timo_update(delta_nsec / 1000); - else { - if (log_level >= 2) - log_puts("ignored huge clock delta\n"); + file_ts = ts; + if (timo_queue) { + if (delta_nsec >= 0 && delta_nsec < 1000000000LL) + timo_update(delta_nsec / 1000); + else { + if (log_level >= 2) + log_puts("ignored huge clock delta\n"); + } } /*