Fix: handle negative clock offset
In the unlikely situation where a system sets its hardware clock
(CLOCK_REALTIME) to 0 (Epoch) after boot, the difference
monotonic - realtime
becomes negative.
Fixup this situation by returning a 0 offset in this case.
This ensures that trace viewer implementations (e.g. babeltrace) which
currently cannot handle the negative offset (known bug) still work with
the generated traces.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
This page took 0.02543 seconds and 4 git commands to generate.