]> arthur.barton.de Git - netdata.git/commitdiff
use monotonic clock for logs flooding detection
authorRémi Lefèvre <remi.lefevre@parrot.com>
Fri, 9 Dec 2016 08:54:07 +0000 (09:54 +0100)
committerRémi Lefèvre <remi.lefevre@parrot.com>
Sun, 11 Dec 2016 10:51:58 +0000 (11:51 +0100)
This avoids incorrect flood detection on system time changes or
system hibernation/suspend.

Signed-off-by: Rémi Lefèvre <remi.lefevre@parrot.com>
src/log.c

index 78c58ab80302110a12f26bbcc225df8118eaca9a..d4c7fa14d904a6ee9007863e03f6ef73418ae0b9 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -131,7 +131,7 @@ int error_log_limit(int reset) {
         return 1;
 #endif
 
-    time_t now = now_realtime_sec();
+    time_t now = now_monotonic_sec();
     if(!start) start = now;
 
     if(reset) {