chiark / gitweb /
timer: implement calendar time events
[elogind.git] / src / core / swap.c
index 97145a9974a404ca1bfac7ad6748b078310fd3a7..bd40516c99743743238ea87a9025b067e07dadaf 100644 (file)
@@ -521,7 +521,7 @@ static int swap_coldplug(Unit *u) {
                         if (r < 0)
                                 return r;
 
-                        r = unit_watch_timer(UNIT(s), s->timeout_usec, &s->timer_watch);
+                        r = unit_watch_timer(UNIT(s), CLOCK_MONOTONIC, true, s->timeout_usec, &s->timer_watch);
                         if (r < 0)
                                 return r;
                 }
@@ -584,7 +584,7 @@ static int swap_spawn(Swap *s, ExecCommand *c, pid_t *_pid) {
         assert(c);
         assert(_pid);
 
-        r = unit_watch_timer(UNIT(s), s->timeout_usec, &s->timer_watch);
+        r = unit_watch_timer(UNIT(s), CLOCK_MONOTONIC, true, s->timeout_usec, &s->timer_watch);
         if (r < 0)
                 goto fail;
 
@@ -689,7 +689,7 @@ static void swap_enter_signal(Swap *s, SwapState state, SwapResult f) {
         }
 
         if (wait_for_exit) {
-                r = unit_watch_timer(UNIT(s), s->timeout_usec, &s->timer_watch);
+                r = unit_watch_timer(UNIT(s), CLOCK_MONOTONIC, true, s->timeout_usec, &s->timer_watch);
                 if (r < 0)
                         goto fail;