Handle negative time and offset from Epoch
[babeltrace.git] / include / babeltrace / clock-internal.h
index cd6bdbae03b9d2ecc8ad7f04142378cf280b0a95..4bd46111c8ab6ab0df757ef97426e75dc94bd690 100644 (file)
@@ -47,9 +47,10 @@ uint64_t clock_cycles_to_ns(struct ctf_clock *clock, uint64_t cycles)
  * is recommended to express the seconds in offset_s, otherwise there
  * will be a loss of precision caused by the limited size of the double
  * mantissa.
+ * This offset can be negative.
  */
 static inline
-uint64_t clock_offset_ns(struct ctf_clock *clock)
+int64_t clock_offset_ns(struct ctf_clock *clock)
 {
        return clock->offset_s * 1000000000ULL
                        + clock_cycles_to_ns(clock, clock->offset);
This page took 0.023339 seconds and 4 git commands to generate.