From: Philippe Proulx Date: Fri, 19 Feb 2016 02:16:59 +0000 (-0500) Subject: ir: move clock value accessors to writer header X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=64cf1d3a1cc21cdb2aff576a268dd2e6989a5510;p=deliverable%2Fbabeltrace.git ir: move clock value accessors to writer header Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- diff --git a/include/babeltrace/ctf-ir/clock.h b/include/babeltrace/ctf-ir/clock.h index 1b7a004d0..ec08810b6 100644 --- a/include/babeltrace/ctf-ir/clock.h +++ b/include/babeltrace/ctf-ir/clock.h @@ -237,36 +237,6 @@ extern const unsigned char *bt_ctf_clock_get_uuid(struct bt_ctf_clock *clock); extern int bt_ctf_clock_set_uuid(struct bt_ctf_clock *clock, const unsigned char *uuid); -/* - * bt_ctf_clock_get_time: get a clock's current time value. - * - * Get the current time in nanoseconds since the clock's origin (offset and - * offset_s attributes). - * - * @param clock Clock instance. - * @param time Clock current time value (output). - * - * Returns 0 on success, a negative value on error. - */ -extern int bt_ctf_clock_get_time(struct bt_ctf_clock *clock, - int64_t *time); - -/* - * bt_ctf_clock_set_time: set a clock's current time value. - * - * Set the current time in nanoseconds since the clock's origin (offset and - * offset_s attributes). Defaults to 0. - * - * Returns 0 on success, a negative value on error. - */ -extern int bt_ctf_clock_set_time(struct bt_ctf_clock *clock, - int64_t time); - -extern uint64_t bt_ctf_clock_get_value(struct bt_ctf_clock *clock); - -extern int bt_ctf_clock_set_value(struct bt_ctf_clock *clock, - uint64_t value); - #ifdef __cplusplus } #endif diff --git a/include/babeltrace/ctf-writer/clock.h b/include/babeltrace/ctf-writer/clock.h index cb17ca2b0..1bacc34e2 100644 --- a/include/babeltrace/ctf-writer/clock.h +++ b/include/babeltrace/ctf-writer/clock.h @@ -36,6 +36,24 @@ extern "C" { #endif +extern int bt_ctf_clock_get_time(struct bt_ctf_clock *clock, int64_t *time); + +/* + * bt_ctf_clock_set_time: set a clock's current time value. + * + * Set the current time in nanoseconds since the clock's origin (offset and + * offset_s attributes). Defaults to 0. + * + * Returns 0 on success, a negative value on error. + */ +extern int bt_ctf_clock_set_time(struct bt_ctf_clock *clock, + int64_t time); + +extern uint64_t bt_ctf_clock_get_value(struct bt_ctf_clock *clock); + +extern int bt_ctf_clock_set_value(struct bt_ctf_clock *clock, + uint64_t value); + /* * bt_ctf_clock_get and bt_ctf_clock_put: increment and decrement the * refcount of the clock