1
0
Fork 0
mirror of https://passt.top/passt synced 2025-05-21 16:55:34 +02:00

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 <sbrivio@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
Stefano Brivio 2024-07-24 17:39:55 +02:00
parent 327d9d482f
commit e5c37ba0f4
3 changed files with 4 additions and 3 deletions

View file

@ -207,6 +207,8 @@ int main(int argc, char **argv)
struct timespec now;
struct sigaction sa;
clock_gettime(CLOCK_REALTIME, &log_start);
arch_avx2_exec(argv);
isolate_initial();