summaryrefslogtreecommitdiff
path: root/src/core/swap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/swap.c')
-rw-r--r--src/core/swap.c7
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) {