From: Konrad Kuchciak Date: Thu, 7 Jan 2021 10:22:11 +0000 (+0100) Subject: Fix running action when reporting_period is higher than uptime X-Git-Tag: submit/tizen_6.0/20210107.115620^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0b4c7dc78dddc3d9882c30fc1c304180340d0a45;p=platform%2Fcore%2Fsystem%2Fstability-monitor.git Fix running action when reporting_period is higher than uptime Change-Id: Ibeb7e42387ded03736a7d258d0b784f66058362c --- 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);