X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Fctf.c;h=ab4945dddcff18b8c41c6df91798096b4940695b;hp=62cc2e3939e2f8506d779aada3c02b215a6623d0;hb=0716bb06f1a2995aedf7df46b0ed00a126fc8f29;hpb=842c2b97eab577484edae763770dfd1440490818 diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index 62cc2e39..ab4945dd 100644 --- a/formats/ctf/ctf.c +++ b/formats/ctf/ctf.c @@ -141,14 +141,13 @@ void ctf_print_timestamp(FILE *fp, uint64_t ts_sec = 0, ts_nsec; struct ctf_trace *trace = stream->stream_class->trace; struct trace_collection *tc = trace->collection; - struct ctf_clock *clock = tc->single_clock; + uint64_t tc_offset = tc->single_clock_offset_avg; ts_nsec = timestamp; /* Add offsets */ - if (!opt_clock_raw && clock) { - ts_sec += clock->offset_s; - ts_nsec += clock->offset; + if (!opt_clock_raw) { + ts_nsec += tc_offset; } ts_sec += opt_clock_offset;