aboutgitcodebugslistschat
path: root/passt.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2024-07-24 17:21:12 +0200
committerStefano Brivio <sbrivio@redhat.com>2024-07-26 13:43:19 +0200
commit327d9d482fd4480ca16e993fe2699c8bbc166251 (patch)
treedbfb4ddf7b70c8a490c999621aab225d67b8076b /passt.c
parent2ce1d3783184ecc637d8e9be997a42e1c78a908e (diff)
downloadpasst-327d9d482fd4480ca16e993fe2699c8bbc166251.tar
passt-327d9d482fd4480ca16e993fe2699c8bbc166251.tar.gz
passt-327d9d482fd4480ca16e993fe2699c8bbc166251.tar.bz2
passt-327d9d482fd4480ca16e993fe2699c8bbc166251.tar.lz
passt-327d9d482fd4480ca16e993fe2699c8bbc166251.tar.xz
passt-327d9d482fd4480ca16e993fe2699c8bbc166251.tar.zst
passt-327d9d482fd4480ca16e993fe2699c8bbc166251.zip
log, util: Fix sub-second part in relative log time calculation
For some reason, in commit 01efc71ddd25 ("log, conf: Add support for logging to file"), I added calculations for relative logging timestamps using the difference for the seconds part only, not for accounting for the fractional part. Fix that by storing the initial timestamp, log_start, as a timespec struct, and by calculating the difference from the starting time. Do this in a macro as we need the same format in a few places. To calculate the difference, turn the existing timespec_diff_ms() to microseconds, timespec_diff_us(), and rewrite timespec_diff_ms() to use that. Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'passt.c')
0 files changed, 0 insertions, 0 deletions