#endif
struct bt_ctf_clock;
+struct bt_ctf_clock_value;
/*
* bt_ctf_clock_create: create a clock.
*
* Allocate a new clock setting its reference count to 1.
*
- * @param name Name of the clock (will be copied).
+ * @param name Name of the clock (will be copied); can be set to NULL
+ * for nameless clocks.
*
* Returns an allocated clock on success, NULL on error.
*/
*/
extern const char *bt_ctf_clock_get_name(struct bt_ctf_clock *clock);
+/*
+ * bt_ctf_clock_set_name: set a clock's name.
+ *
+ * Set a clock's name.
+ *
+ * @param name Name of the clock (will be copied).
+ *
+ * Returns 0 on success, a negative value on error.
+ */
+extern int bt_ctf_clock_set_name(struct bt_ctf_clock *clock, const char *name);
+
/*
* bt_ctf_clock_get_description: get a clock's description.
*
extern int bt_ctf_clock_set_uuid(struct bt_ctf_clock *clock,
const unsigned char *uuid);
+extern struct bt_ctf_clock_value *bt_ctf_clock_value_create(
+ struct bt_ctf_clock *clock, uint64_t 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, int64_t *value_ns);
+
#ifdef __cplusplus
}
#endif