From: Yu Watanabe Date: Tue, 5 Dec 2023 05:23:48 +0000 (+0900) Subject: journal: use sd_event_now() X-Git-Tag: v256-rc1~1561^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F30312%2Fhead;p=thirdparty%2Fsystemd.git journal: use sd_event_now() --- diff --git a/src/journal/journald.c b/src/journal/journald.c index b6b08da3b36..dab0879d333 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 */