chiark / gitweb /
sd-event: rework API to support CLOCK_REALTIME_ALARM and CLOCK_BOOTTIME_ALARM, too
[elogind.git] / src / timedate / timedate-sntp.c
index cb0bf794f1d1641ea6940bf24b97394e09bf0a3f..880b467a8e6ffef9033e41ae59b2c2644e3e865e 100644 (file)
@@ -265,7 +265,12 @@ static int sntp_arm_timer(SNTPContext *sntp, usec_t next) {
         }
 
         e = sd_event_source_get_event(sntp->event_receive);
-        r = sd_event_add_monotonic(e, &sntp->event_timer, now(CLOCK_MONOTONIC) + next, 0, sntp_timer, sntp);
+        r = sd_event_add_time(
+                        e,
+                        &sntp->event_timer,
+                        CLOCK_MONOTONIC,
+                        now(CLOCK_MONOTONIC) + next, 0,
+                        sntp_timer, sntp);
         if (r < 0)
                 return r;