diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2021-08-04 01:39:00 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2021-08-04 01:39:00 +0200 |
commit | a340e5336d28f5f945287a87d9d20775516c4557 (patch) | |
tree | 13796413eeb073d955acd62fe1a84966222829a4 /util.c | |
parent | 539dcf5add9c8a3cd22ca8af89069be1bbbcf3f6 (diff) | |
download | passt-a340e5336d28f5f945287a87d9d20775516c4557.tar passt-a340e5336d28f5f945287a87d9d20775516c4557.tar.gz passt-a340e5336d28f5f945287a87d9d20775516c4557.tar.bz2 passt-a340e5336d28f5f945287a87d9d20775516c4557.tar.lz passt-a340e5336d28f5f945287a87d9d20775516c4557.tar.xz passt-a340e5336d28f5f945287a87d9d20775516c4557.tar.zst passt-a340e5336d28f5f945287a87d9d20775516c4557.zip |
util: Fix millisecond logging timestamp calculation
Four sub-second digits means 0.1ms units: divide nanoseconds by
10^5, not 10^6.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -48,7 +48,7 @@ void name(const char *format, ...) { \ tm = gmtime(&tp.tv_sec); \ strftime(ts, sizeof(ts), "%b %d %T.", tm); \ \ - fprintf(stderr, "%s%04lu: ", ts, tp.tv_nsec / (1000 * 1000)); \ + fprintf(stderr, "%s%04lu: ", ts, tp.tv_nsec / (100 * 1000)); \ va_start(args, format); \ vsyslog(level, format, args); \ va_end(args); \ |