1 #ifndef BABELTRACE2_TRACE_IR_CLOCK_CLASS_H
2 #define BABELTRACE2_TRACE_IR_CLOCK_CLASS_H
26 #ifndef __BT_IN_BABELTRACE_H
27 # error "Please include <babeltrace2/babeltrace.h> instead."
32 #include <babeltrace2/types.h>
426 int64_t offset_seconds, uint64_t offset_cycles);
453 int64_t *offset_seconds, uint64_t *offset_cycles);
887 uint64_t value, int64_t *ns_from_origin);
944 #define BT_CLOCK_CLASS_PUT_REF_AND_RESET(_clock_class) \
946 bt_clock_class_put_ref(_clock_class); \
947 (_clock_class) = NULL; \
975 #define BT_CLOCK_CLASS_MOVE_REF(_dst, _src) \
977 bt_clock_class_put_ref(_dst); \
Success.
Definition: clock-class.h:555
void bt_clock_class_set_user_attributes(bt_clock_class *clock_class, const bt_value *user_attributes)
Sets the user attributes of the clock class clock_class to user_attributes.
Success.
Definition: clock-class.h:627
const char * bt_clock_class_get_description(const bt_clock_class *clock_class)
Returns the description of the clock class clock_class.
struct bt_self_component bt_self_component
Self component.
Definition: types.h:85
bt_bool bt_clock_class_origin_is_unix_epoch(const bt_clock_class *clock_class)
Returns whether or not the origin of the clock class clock_class is the Unix epoch.
bt_clock_class_set_name_status
Status codes for bt_clock_class_set_name().
Definition: clock-class.h:550
bt_clock_class_cycles_to_ns_from_origin_status
Status codes for bt_clock_class_cycles_to_ns_from_origin().
Definition: clock-class.h:820
void bt_clock_class_set_origin_is_unix_epoch(bt_clock_class *clock_class, bt_bool origin_is_unix_epoch)
Sets whether or not the origin of the clock class clock_class is the Unix epoch.
uint64_t bt_clock_class_get_precision(const bt_clock_class *clock_class)
Returns the precision (cycles) of the clock class clock_class.
void bt_clock_class_get_ref(const bt_clock_class *clock_class)
Increments the reference count of the clock class clock_class.
const char * bt_clock_class_get_name(const bt_clock_class *clock_class)
Returns the name of the clock class clock_class.
void bt_clock_class_set_precision(bt_clock_class *clock_class, uint64_t precision)
Sets the precision (cycles) of the clock class clock_class to precision.
bt_uuid bt_clock_class_get_uuid(const bt_clock_class *clock_class)
Returns the UUID of the clock class clock_class.
void bt_clock_class_set_uuid(bt_clock_class *clock_class, bt_uuid uuid)
Sets the UUID of the clock class clock_class to a copy of uuid.
uint64_t bt_clock_class_get_frequency(const bt_clock_class *clock_class)
Returns the frequency (Hz) of the clock class clock_class.
void bt_clock_class_put_ref(const bt_clock_class *clock_class)
Decrements the reference count of the clock class clock_class.
bt_value * bt_clock_class_borrow_user_attributes(bt_clock_class *clock_class)
Borrows the user attributes of the clock class clock_class.
struct bt_value bt_value
Value.
Definition: types.h:107
int bt_bool
Babeltrace 2 boolean type.
Definition: types.h:140
Success.
Definition: clock-class.h:825
Out of memory.
Definition: clock-class.h:633
void bt_clock_class_get_offset(const bt_clock_class *clock_class, int64_t *offset_seconds, uint64_t *offset_cycles)
Returns the offsets in seconds and cycles of the clock class clock_class.
const bt_value * bt_clock_class_borrow_user_attributes_const(const bt_clock_class *clock_class)
Borrows the user attributes of the clock class clock_class (const version).
bt_clock_class * bt_clock_class_create(bt_self_component *self_component)
Creates a default clock class from the self component self_component.
bt_clock_class_set_name_status bt_clock_class_set_name(bt_clock_class *clock_class, const char *name)
Sets the name of the clock class clock_class to a copy of name.
bt_clock_class_cycles_to_ns_from_origin_status bt_clock_class_cycles_to_ns_from_origin(const bt_clock_class *clock_class, uint64_t value, int64_t *ns_from_origin)
Converts the stream clock value value from cycles to nanoseconds from the origin of the clock class c...
Integer overflow while computing the result.
Definition: clock-class.h:831
Out of memory.
Definition: clock-class.h:561
bt_clock_class_set_description_status bt_clock_class_set_description(bt_clock_class *clock_class, const char *description)
Sets the description of the clock class clock_class to a copy of description.
void bt_clock_class_set_frequency(bt_clock_class *clock_class, uint64_t frequency)
Sets the frequency (Hz) of the clock class clock_class to frequency.
bt_clock_class_set_description_status
Status codes for bt_clock_class_set_description().
Definition: clock-class.h:622
void bt_clock_class_set_offset(bt_clock_class *clock_class, int64_t offset_seconds, uint64_t offset_cycles)
Sets the offset of the clock class clock_class to offset_seconds plus offset_cycles from its origin...
struct bt_clock_class bt_clock_class
Clock class.
Definition: types.h:36
uint8_t const * bt_uuid
A UUID, that is, an array of 16 constant bytes.
Definition: types.h:158