diff --git a/src/journal/journald.c b/src/journal/journald.c index b6b08da3b3..dab0879d33 100644 --- a/src/journal/journald.c +++ b/src/journal/journald.c @@ -83,7 +83,9 @@ static int run(int argc, char *argv[]) { if (r == SD_EVENT_FINISHED) break; - n = now(CLOCK_REALTIME); + r = sd_event_now(s->event, CLOCK_REALTIME, &n); + if (r < 0) + return log_error_errno(r, "Failed to get the current time: %m"); if (s->max_retention_usec > 0 && s->oldest_file_usec > 0) { /* Calculate when to rotate the next time */