X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fscope.c;h=e8f9e8dd738ab56faaf5cfa3b678684f21af9c38;hb=56dec05d29098b151421625c68525c2c3961e574;hp=aa4978de4c8e28a1257a9df2d63e24ddae033d67;hpb=598459cebac7cc93089769a992e7b03287f77e12;p=elogind.git diff --git a/src/core/scope.c b/src/core/scope.c index aa4978de4..e8f9e8dd7 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) {