journal: use sd_event_now()
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user