X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fswap.c;h=10eed6d25fcb33fb9065845911ac739ed165b296;hb=530a9662aa3d291555e5b3f6eb43199e1b04f63c;hp=7da742e873ac0defd55ea70e80eab6aa6ec993b3;hpb=598459cebac7cc93089769a992e7b03287f77e12;p=elogind.git diff --git a/src/core/swap.c b/src/core/swap.c index 7da742e87..10eed6d25 100644 --- a/src/core/swap.c +++ b/src/core/swap.c @@ -179,7 +179,12 @@ static int swap_arm_timer(Swap *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_usec, 0, swap_dispatch_timer, s); + return sd_event_add_time( + UNIT(s)->manager->event, + &s->timer_event_source, + CLOCK_MONOTONIC, + now(CLOCK_MONOTONIC) + s->timeout_usec, 0, + swap_dispatch_timer, s); } static int swap_add_device_links(Swap *s) {