From 6a0f1f6d5af7c7300d3db7a0ba2b068f8abd222b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 24 Mar 2014 02:49:09 +0100 Subject: sd-event: rework API to support CLOCK_REALTIME_ALARM and CLOCK_BOOTTIME_ALARM, too --- src/core/scope.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/core/scope.c') diff --git a/src/core/scope.c b/src/core/scope.c index aa4978de4c..e8f9e8dd73 100644 --- a/src/core/scope.c +++ b/src/core/scope.c @@ -83,7 +83,12 @@ static int scope_arm_timer(Scope *s) { return sd_event_source_set_enabled(s->timer_event_source, SD_EVENT_ONESHOT); } - return sd_event_add_monotonic(UNIT(s)->manager->event, &s->timer_event_source, now(CLOCK_MONOTONIC) + s->timeout_stop_usec, 0, scope_dispatch_timer, s); + return sd_event_add_time( + UNIT(s)->manager->event, + &s->timer_event_source, + CLOCK_MONOTONIC, + now(CLOCK_MONOTONIC) + s->timeout_stop_usec, 0, + scope_dispatch_timer, s); } static void scope_set_state(Scope *s, ScopeState state) { -- cgit v1.2.3-54-g00ecf