mirror of
https://passt.top/passt
synced 2025-05-20 08:25:34 +02:00
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 <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
e5c37ba0f4
commit
77c092ee5e
2 changed files with 3 additions and 3 deletions
2
passt.c
2
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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue