From 457761f060fb60fee1665da87ee1facd1f401cfb Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Sat, 19 Dec 2015 18:28:12 +0000 Subject: [PATCH] Don't spam stats reports if the system clock jumps. --- dump1090.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dump1090.c b/dump1090.c index 8df3059..b53a00b 100644 --- a/dump1090.c +++ b/dump1090.c @@ -810,6 +810,10 @@ void backgroundTasks(void) { reset_stats(&Modes.stats_periodic); next_stats_display += Modes.stats; + if (next_stats_display <= now) { + /* something has gone wrong, perhaps the system clock jumped */ + next_stats_display = now + Modes.stats; + } } }