diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-03-24 02:49:09 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-03-24 02:58:41 +0100 |
commit | 6a0f1f6d5af7c7300d3db7a0ba2b068f8abd222b (patch) | |
tree | 37083cf4a7292fc4657372d034475e026693f969 /src/core/swap.c | |
parent | f66eeb6bb636f8061bf45e6e8e24761e87510800 (diff) |
sd-event: rework API to support CLOCK_REALTIME_ALARM and CLOCK_BOOTTIME_ALARM, too
Diffstat (limited to 'src/core/swap.c')
-rw-r--r-- | src/core/swap.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/swap.c b/src/core/swap.c index 7da742e873..10eed6d25f 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) { |