summaryrefslogtreecommitdiff
path: root/src/login/logind.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/login/logind.c')
-rw-r--r--src/login/logind.c7
1 files changed, 6 insertions, 1 deletions
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;