diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2024-07-24 17:39:55 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-07-26 13:47:34 +0200 |
commit | e5c37ba0f419fd6c46d11ee9ec909b3fa9d2aa2f (patch) | |
tree | d281ab045a34e064bc7451238d99271e970c0716 /passt.c | |
parent | 327d9d482fd4480ca16e993fe2699c8bbc166251 (diff) | |
download | passt-e5c37ba0f419fd6c46d11ee9ec909b3fa9d2aa2f.tar passt-e5c37ba0f419fd6c46d11ee9ec909b3fa9d2aa2f.tar.gz passt-e5c37ba0f419fd6c46d11ee9ec909b3fa9d2aa2f.tar.bz2 passt-e5c37ba0f419fd6c46d11ee9ec909b3fa9d2aa2f.tar.lz passt-e5c37ba0f419fd6c46d11ee9ec909b3fa9d2aa2f.tar.xz passt-e5c37ba0f419fd6c46d11ee9ec909b3fa9d2aa2f.tar.zst passt-e5c37ba0f419fd6c46d11ee9ec909b3fa9d2aa2f.zip |
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>
Diffstat (limited to 'passt.c')
-rw-r--r-- | passt.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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(); |