mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
csv: only print offset if both received and origin timestamps are available
This commit is contained in:
parent
39afa0e8a2
commit
65828daed4
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ static size_t csv_sprint_single(struct io *io, char *buf, size_t len, const stru
|
|||
}
|
||||
|
||||
if (io->flags & SAMPLE_HAS_OFFSET) {
|
||||
if (smp->flags & SAMPLE_HAS_TS_RECEIVED)
|
||||
if ((smp->flags & SAMPLE_HAS_TS_RECEIVED) && (smp->flags & SAMPLE_HAS_TS_RECEIVED))
|
||||
off += snprintf(buf + off, len - off, "%c%.09f", io->separator, time_delta(&smp->ts.origin, &smp->ts.received));
|
||||
else
|
||||
off += snprintf(buf + off, len - off, "%cnan", io->separator);
|
||||
|
|
Loading…
Add table
Reference in a new issue