From 0b4c7dc78dddc3d9882c30fc1c304180340d0a45 Mon Sep 17 00:00:00 2001 From: Konrad Kuchciak Date: Thu, 7 Jan 2021 11:22:11 +0100 Subject: [PATCH] Fix running action when reporting_period is higher than uptime Change-Id: Ibeb7e42387ded03736a7d258d0b784f66058362c --- src/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/process.c b/src/process.c index cf6b183..94cd2c3 100644 --- a/src/process.c +++ b/src/process.c @@ -396,7 +396,7 @@ static void _run_action(struct data_source *ds, enum limit_type lt) { unsigned long long t = time_now(); - if ((ds->reporting_period < 0 && ds->last_report_time == 0) || + if (ds->last_report_time == 0 || (ds->reporting_period >= 0 && t - ds->last_report_time > ds->reporting_period * USEC_PER_SEC)) { ds->action(ds, lt); -- 2.34.1