From: Romain Forlot Date: Thu, 30 Mar 2017 08:23:04 +0000 (+0200) Subject: Get recurring requests suspend proof. X-Git-Tag: 3.99.1~185 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=dad5753b133c5312f51a4b154b91559bda94aef9;p=apps%2Flow-level-can-service.git Get recurring requests suspend proof. Change to CLOCK_BOOTTIME instead of CLOCK_MONOTONIC Change-Id: Iaa1a65a80e3aaa8e622ea1e3eb4b6a36b4dcd225 Signed-off-by: Romain Forlot --- diff --git a/src/diagnostic/diagnostic-manager.cpp b/src/diagnostic/diagnostic-manager.cpp index 1012920..ee584bf 100644 --- a/src/diagnostic/diagnostic-manager.cpp +++ b/src/diagnostic/diagnostic-manager.cpp @@ -374,7 +374,7 @@ bool diagnostic_manager_t::add_recurring_request(DiagnosticRequest* request, con sizeof(request_string)); uint64_t usec; - sd_event_now(afb_daemon_get_event_loop(binder_interface->daemon), CLOCK_MONOTONIC, &usec); + sd_event_now(afb_daemon_get_event_loop(binder_interface->daemon), CLOCK_BOOTTIME, &usec); DEBUG(binder_interface, "add_recurring_request: Added recurring diagnostic request (freq: %f) on bus %s: (%s) at %ld", frequencyHz, @@ -383,7 +383,7 @@ bool diagnostic_manager_t::add_recurring_request(DiagnosticRequest* request, con usec); if(sd_event_add_time(afb_daemon_get_event_loop(binder_interface->daemon), &source, - CLOCK_MONOTONIC, usec, TIMERFD_ACCURACY, send_request, request) < 0) + CLOCK_BOOTTIME, usec, TIMERFD_ACCURACY, send_request, request) < 0) { ERROR(binder_interface, "add_recurring_request: Request fails to be schedule through event loop"); added = false;