From e5c37ba0f419fd6c46d11ee9ec909b3fa9d2aa2f Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Wed, 24 Jul 2024 17:39:55 +0200 Subject: log: Initialise timestamp for relative log time also if we use a log file ...not just for debug messages. Otherwise, timestamps in the log file are consistent but the starting point is not zero. Do this right away as we enter main(), so that the resulting timestamps are as closely as possible relative to when we start. Signed-off-by: Stefano Brivio Reviewed-by: David Gibson --- log.h | 1 + 1 file changed, 1 insertion(+) (limited to 'log.h') diff --git a/log.h b/log.h index 51ddafa..e03199c 100644 --- a/log.h +++ b/log.h @@ -44,6 +44,7 @@ void logmsg_perror(int pri, const char *format, ...) extern int log_trace; extern bool log_conf_parsed; extern bool log_runtime; +extern struct timespec log_start; void trace_init(int enable); #define trace(...) \ -- cgit v1.2.3