]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal: use sd_event_now() 30312/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 5 Dec 2023 05:23:48 +0000 (14:23 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 6 Dec 2023 02:01:32 +0000 (11:01 +0900)
src/journal/journald.c

index b6b08da3b3624240ba89dd76ebd3fd33013dc1c7..dab0879d333d32837a3d950d41dff910a116ef75 100644 (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 */