diff options
Diffstat (limited to 'src/login')
-rw-r--r-- | src/login/logind-dbus.c | 7 | ||||
-rw-r--r-- | src/login/logind-session.c | 6 | ||||
-rw-r--r-- | src/login/logind.c | 7 |
3 files changed, 17 insertions, 3 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 2ef87f72aa..0af67148af 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -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; } diff --git a/src/login/logind-session.c b/src/login/logind-session.c index 8c517f46a7..4ca6b5d805 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -682,7 +682,11 @@ void session_release(Session *s) { return; if (!s->timer_event_source) - sd_event_add_monotonic(s->manager->event, &s->timer_event_source, now(CLOCK_MONOTONIC) + RELEASE_USEC, 0, release_timeout_callback, s); + sd_event_add_time(s->manager->event, + &s->timer_event_source, + CLOCK_MONOTONIC, + now(CLOCK_MONOTONIC) + RELEASE_USEC, 0, + release_timeout_callback, s); } bool session_is_active(Session *s) { diff --git a/src/login/logind.c b/src/login/logind.c index db9882323f..86ce7df5d6 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -933,7 +933,12 @@ static int manager_dispatch_idle_action(sd_event_source *s, uint64_t t, void *us if (!m->idle_action_event_source) { - r = sd_event_add_monotonic(m->event, &m->idle_action_event_source, elapse, USEC_PER_SEC*30, manager_dispatch_idle_action, m); + r = sd_event_add_time( + m->event, + &m->idle_action_event_source, + CLOCK_MONOTONIC, + elapse, USEC_PER_SEC*30, + manager_dispatch_idle_action, m); if (r < 0) { log_error("Failed to add idle event source: %s", strerror(-r)); return r; |