summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-30 10:23:04 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-04-11 12:41:42 +0200
commitdad5753b133c5312f51a4b154b91559bda94aef9 (patch)
tree95b6d7233e7044db65c2cdd086ead9de85038153
parent3b731757c05be4df22b9659a19912297be8d1804 (diff)
Get recurring requests suspend proof.
Change to CLOCK_BOOTTIME instead of CLOCK_MONOTONIC Change-Id: Iaa1a65a80e3aaa8e622ea1e3eb4b6a36b4dcd225 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--src/diagnostic/diagnostic-manager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/diagnostic/diagnostic-manager.cpp b/src/diagnostic/diagnostic-manager.cpp
index 1012920f..ee584bf7 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;