X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=include%2Fbabeltrace%2Fctf-ir%2Ftrace.h;h=d36da0eb43d86fa93d9827ea6f3a19e446b025ee;hp=1be85cfdeb4d197246ce6fe7324c56b20fa0f2ab;hb=884cd6c32dddeb5e9fa8d0255992956112381123;hpb=e1ae7645ef265eb69a0a500c8f4d6620c50543da diff --git a/include/babeltrace/ctf-ir/trace.h b/include/babeltrace/ctf-ir/trace.h index 1be85cfd..d36da0eb 100644 --- a/include/babeltrace/ctf-ir/trace.h +++ b/include/babeltrace/ctf-ir/trace.h @@ -95,6 +95,27 @@ extern int bt_ctf_trace_add_environment_field(struct bt_ctf_trace *trace, extern int bt_ctf_trace_add_clock(struct bt_ctf_trace *trace, struct bt_ctf_clock *clock); +/* + * bt_ctf_trace_get_clock_count: get the number of clocks + * associated to the trace. + * + * @param trace Trace instance. + * + * Returns the clock count on success, a negative value on error. + */ +extern int bt_ctf_trace_get_clock_count(struct bt_ctf_trace *trace); + +/* + * bt_ctf_trace_get_clock: get a trace's clock at index. + * + * @param trace Trace instance. + * @param index Index of the clock in the given trace. + * + * Return a clock instance on success, NULL on error. + */ +extern struct bt_ctf_clock *bt_ctf_trace_get_clock( + struct bt_ctf_trace *trace, int index); + /* * bt_ctf_trace_get_metadata_string: get metadata string. *