X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fctf-ir%2Fclock-value.h;h=19b9aec6f3a381ba01b85c6222caa85795641c7f;hb=c800eb3790218d2f33df01e77ec38cbd43cc02a1;hp=d0464d36d0295da132d45a2859ef14c044b43a79;hpb=9d408fcae74602e3591f66623ceb85f482d948ed;p=babeltrace.git diff --git a/include/babeltrace/ctf-ir/clock-value.h b/include/babeltrace/ctf-ir/clock-value.h index d0464d36..19b9aec6 100644 --- a/include/babeltrace/ctf-ir/clock-value.h +++ b/include/babeltrace/ctf-ir/clock-value.h @@ -31,23 +31,32 @@ * http://www.efficios.com/ctf */ +/* For bt_get() */ +#include + #include #ifdef __cplusplus extern "C" { #endif -struct bt_ctf_clock_class; -struct bt_ctf_clock_value; - -extern struct bt_ctf_clock_value *bt_ctf_clock_value_create( - struct bt_ctf_clock_class *clock_class, uint64_t value); -extern struct bt_ctf_clock_class *bt_ctf_clock_value_get_class( - struct bt_ctf_clock_value *clock_value); -extern int bt_ctf_clock_value_get_value( - struct bt_ctf_clock_value *clock_value, uint64_t *raw_value); -extern int bt_ctf_clock_value_get_value_ns_from_epoch( - struct bt_ctf_clock_value *clock_value, int64_t *value_ns); +struct bt_clock_class; +struct bt_clock_value; + +extern struct bt_clock_class *bt_clock_value_borrow_class( + struct bt_clock_value *clock_value); + +static inline +struct bt_clock_class *bt_clock_value_get_class( + struct bt_clock_value *clock_value) +{ + return bt_get(bt_clock_value_borrow_class(clock_value)); +} + +extern int bt_clock_value_get_value( + struct bt_clock_value *clock_value, uint64_t *raw_value); +extern int bt_clock_value_get_value_ns_from_epoch( + struct bt_clock_value *clock_value, int64_t *value_ns); #ifdef __cplusplus }