aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-08-04 01:39:00 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-08-04 01:39:00 +0200
commita340e5336d28f5f945287a87d9d20775516c4557 (patch)
tree13796413eeb073d955acd62fe1a84966222829a4
parent539dcf5add9c8a3cd22ca8af89069be1bbbcf3f6 (diff)
downloadpasst-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>
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index fe18cd8..46589a4 100644
--- a/util.c
+++ b/util.c
@@ -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); \