1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

print sample offset always in scientific notation

This commit is contained in:
Steffen Vogel 2016-09-13 21:16:17 -04:00
parent b9f681751a
commit d958b08d62

View file

@ -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);