From 77c092ee5ede9a2642978b9874b3c17e88829fbf Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Thu, 25 Jul 2024 17:58:44 +0200 Subject: log: Fetch log times with CLOCK_MONOTONIC, not CLOCK_REALTIME We report relative timestamps in logs, so we want to avoid jumps in the system time. Suggested-by: David Gibson Signed-off-by: Stefano Brivio Reviewed-by: David Gibson --- passt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'passt.c') diff --git a/passt.c b/passt.c index 72ad704..6401730 100644 --- a/passt.c +++ b/passt.c @@ -207,7 +207,7 @@ int main(int argc, char **argv) struct timespec now; struct sigaction sa; - clock_gettime(CLOCK_REALTIME, &log_start); + clock_gettime(CLOCK_MONOTONIC, &log_start); arch_avx2_exec(argv); -- cgit v1.2.3