summaryrefslogtreecommitdiff
path: root/src/journal/journald-server.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal/journald-server.c')
-rw-r--r--src/journal/journald-server.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index c2a60d5e83..6da81e7cde 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -1377,14 +1377,19 @@ int server_schedule_sync(Server *s, int priority) {
if (s->sync_interval_usec > 0) {
usec_t when;
- r = sd_event_get_now_monotonic(s->event, &when);
+ r = sd_event_now(s->event, CLOCK_MONOTONIC, &when);
if (r < 0)
return r;
when += s->sync_interval_usec;
if (!s->sync_event_source) {
- r = sd_event_add_monotonic(s->event, &s->sync_event_source, when, 0, server_dispatch_sync, s);
+ r = sd_event_add_time(
+ s->event,
+ &s->sync_event_source,
+ CLOCK_MONOTONIC,
+ when, 0,
+ server_dispatch_sync, s);
if (r < 0)
return r;