chiark / gitweb /
sd-event: rework API to support CLOCK_REALTIME_ALARM and CLOCK_BOOTTIME_ALARM, too
[elogind.git] / src / login / logind-dbus.c
index 2ef87f72aa00a60982e51103f1375c1d444127e8..0af67148af00a3b3e0c9bfe1378f9db6d6626979 100644 (file)
@@ -1340,7 +1340,12 @@ int manager_set_lid_switch_ignore(Manager *m, usec_t until) {
 
                 r = sd_event_source_set_time(m->lid_switch_ignore_event_source, until);
         } else
-                r = sd_event_add_monotonic(m->event, &m->lid_switch_ignore_event_source, until, 0, lid_switch_ignore_handler, m);
+                r = sd_event_add_time(
+                                m->event,
+                                &m->lid_switch_ignore_event_source,
+                                CLOCK_MONOTONIC,
+                                until, 0,
+                                lid_switch_ignore_handler, m);
 
         return r;
 }