This is not a bug in UST per se, because we happen to force
multiplication by a ULL number, but force cast to uint64_t anyway to
ensure we don't trigger this overflow if the constant ever happen to
change.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
return 0;
monotonic[1] = trace_clock_read64();
offset = (monotonic[0] + monotonic[1]) >> 1;
- realtime = rts.tv_sec * 1000000000ULL;
+ realtime = (uint64_t) rts.tv_sec * 1000000000ULL;
realtime += rts.tv_nsec;
offset = realtime - offset;
return offset;