journal: use sd_event_now()

This commit is contained in:
Yu Watanabe
2023-12-06 11:01:32 +09:00
parent 90c27eb43b
commit 2ae16d36ac
+3 -1
View File
@@ -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 */