From: Mathieu Desnoyers Date: Mon, 22 Apr 2013 14:21:48 +0000 (-0400) Subject: Fix: babeltrace-log timestamps should be in nsec X-Git-Tag: v1.1.1~28 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=af60c9882fb67f7b63a37c358062c2e1f121ad53 Fix: babeltrace-log timestamps should be in nsec Those were in usec, and babeltrace expect nsec by default for default clock. Most of the work has been focused on LTTng and read-side lately, therefore babeltrace-log went under the radar. Signed-off-by: Mathieu Desnoyers --- diff --git a/converter/babeltrace-log.c b/converter/babeltrace-log.c index 21487119..8ea64ab3 100644 --- a/converter/babeltrace-log.c +++ b/converter/babeltrace-log.c @@ -191,6 +191,11 @@ void write_event_header(struct ctf_stream_pos *pos, char *line, } *tlen = len + line - *tline; *ts = (uint64_t) sec * USEC_PER_SEC + (uint64_t) usec; + /* + * Default CTF clock has 1GHz frequency. Convert + * from usec to nsec. + */ + *ts *= 1000; } } /* timestamp */