summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-03-24 02:49:09 +0100
committerLennart Poettering <lennart@poettering.net>2014-03-24 02:58:41 +0100
commit6a0f1f6d5af7c7300d3db7a0ba2b068f8abd222b (patch)
tree37083cf4a7292fc4657372d034475e026693f969 /src/journal
parentf66eeb6bb636f8061bf45e6e8e24761e87510800 (diff)
sd-event: rework API to support CLOCK_REALTIME_ALARM and CLOCK_BOOTTIME_ALARM, too
Diffstat (limited to 'src/journal')
-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;