]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/udev/udev-ctrl.c
tree-wide: make use of new relative time events in sd-event.h
[thirdparty/systemd.git] / src / udev / udev-ctrl.c
index 1e51f22e26035c41b0873e9a314c1488d430f004..dafe3da2511b39ac55f701160277a3614f3adba6 100644 (file)
@@ -392,9 +392,10 @@ int udev_ctrl_wait(struct udev_ctrl *uctrl, usec_t timeout) {
         (void) sd_event_source_set_description(source_io, "udev-ctrl-wait-io");
 
         if (timeout != USEC_INFINITY) {
-                r = sd_event_add_time(uctrl->event, &source_timeout, clock_boottime_or_monotonic(),
-                                      usec_add(now(clock_boottime_or_monotonic()), timeout),
-                                      0, NULL, INT_TO_PTR(-ETIMEDOUT));
+                r = sd_event_add_time_relative(
+                                uctrl->event, &source_timeout, clock_boottime_or_monotonic(),
+                                timeout,
+                                0, NULL, INT_TO_PTR(-ETIMEDOUT));
                 if (r < 0)
                         return r;