From 36f0b766450e1995af1453957ee8ad3d67566667 Mon Sep 17 00:00:00 2001 From: David Schweikert Date: Wed, 2 Nov 2016 08:17:07 +0100 Subject: [PATCH] fix interval reporting --- src/fping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fping.c b/src/fping.c index cc5d715..cb45f0a 100644 --- a/src/fping.c +++ b/src/fping.c @@ -1098,7 +1098,7 @@ void main_loop() /* Make sure we don't wait too long, in case a report is expected */ if( report_interval && ( loop_flag || count_flag ) ) { - wait_time_next_report = timeval_diff ( ¤t_time, &next_report_time ); + wait_time_next_report = timeval_diff ( &next_report_time, ¤t_time ); if(wait_time_next_report < wait_time) { wait_time = wait_time_next_report; if(wait_time < 0) { wait_time = 0; }