From d958b08d62e413bb6e16399ad2c6dd35561f16a6 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 13 Sep 2016 21:16:17 -0400 Subject: [PATCH] print sample offset always in scientific notation --- lib/sample.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sample.c b/lib/sample.c index b2d5a505b..f582c2e8d 100644 --- a/lib/sample.c +++ b/lib/sample.c @@ -33,7 +33,7 @@ int sample_print(char *buf, size_t len, struct sample *s, int flags) off += snprintf(buf + off, len - off, ".%09llu", (unsigned long long) s->ts.origin.tv_nsec); if (flags & SAMPLE_OFFSET) - off += snprintf(buf + off, len - off, "%+g", time_delta(&s->ts.received, &s->ts.origin)); + off += snprintf(buf + off, len - off, "%+e", time_delta(&s->ts.origin, &s->ts.received)); if (flags & SAMPLE_SEQUENCE) off += snprintf(buf + off, len - off, "(%u)", s->sequence);