From 2ae16d36ac8b4873a2741acc5e9a1cec116fdf5c Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 5 Dec 2023 14:23:48 +0900 Subject: [PATCH] journal: use sd_event_now() --- src/journal/journald.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 */ -- 2.47.3