// prevent all logs if the errors per period is 0
if(error_log_errors_per_period == 0)
+#ifdef NETDATA_INTERNAL_CHECKS
+ return 0;
+#else
return 1;
+#endif
- time_t now = time(NULL);
+ time_t now = now_monotonic_sec();
if(!start) start = now;
if(reset) {
prevented++;
// prevent logging this error
+#ifdef NETDATA_INTERNAL_CHECKS
+ return 0;
+#else
return 1;
+#endif
}
return 0;
time_t t;
struct tm *tmp, tmbuf;
- t = time(NULL);
+ t = now_realtime_sec();
tmp = localtime_r(&t, &tmbuf);
if (tmp == NULL) return;