int_ret = bt_clock_class_set_offset_cycles(writer_clock_class, offset);
BT_ASSERT(!int_ret);
- int_ret = bt_clock_class_is_absolute(clock_class);
+ int_ret = bt_clock_class_origin_is_unix_epoch(clock_class);
BT_ASSERT(int_ret >= 0);
- int_ret = bt_clock_class_set_is_absolute(writer_clock_class, int_ret);
+ int_ret = bt_clock_class_set_origin_is_unix_epoch(writer_clock_class, int_ret);
BT_ASSERT(!int_ret);
end:
}
BT_HIDDEN
-enum bt_component_status ctf_copy_clock_classes(FILE *err,
+bt_component_status ctf_copy_clock_classes(FILE *err,
const bt_trace *writer_trace,
const bt_stream_class *writer_stream_class,
const bt_trace *trace)
{
- enum bt_component_status ret;
+ bt_component_status ret;
int int_ret, clock_class_count, i;
clock_class_count = bt_trace_get_clock_class_count(trace);
const char *name;
int ret;
int64_t id;
- enum bt_event_class_log_level log_level;
+ bt_event_class_log_level log_level;
const char *emf_uri;
name = bt_event_class_get_name(event_class);
}
BT_HIDDEN
-enum bt_component_status ctf_copy_event_classes(FILE *err,
+bt_component_status ctf_copy_event_classes(FILE *err,
const bt_stream_class *stream_class,
const bt_stream_class *writer_stream_class)
{
- enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
+ bt_component_status ret = BT_COMPONENT_STATUS_OK;
const bt_event_class *event_class = NULL, *writer_event_class = NULL;
int count, i;
const bt_trace *writer_trace =
const bt_field *event_header)
{
const bt_clock_class *clock_class = NULL, *writer_clock_class = NULL;
- bt_clock_value *clock_value = NULL, *writer_clock_value = NULL;
+ bt_clock_snapshot *clock_snapshot = NULL, *writer_clock_snapshot = NULL;
int ret;
const bt_field *writer_event_header = NULL;
goto error;
}
- clock_value = bt_event_get_clock_value(event, clock_class);
+ clock_snapshot = bt_event_get_clock_snapshot(event, clock_class);
BT_CLOCK_CLASS_PUT_REF_AND_RESET(clock_class);
- BT_ASSERT(clock_value);
+ BT_ASSERT(clock_snapshot);
- ret = bt_clock_value_get_value(clock_value, &value);
- BT_OBJECT_PUT_REF_AND_RESET(clock_value);
+ ret = bt_clock_snapshot_get_value(clock_snapshot, &value);
+ BT_OBJECT_PUT_REF_AND_RESET(clock_snapshot);
if (ret) {
BT_LOGE_STR("Failed to get clock value.");
goto error;
goto error;
}
- writer_clock_value = bt_clock_value_create(writer_clock_class, value);
+ writer_clock_snapshot = bt_clock_snapshot_create(writer_clock_class, value);
BT_CLOCK_CLASS_PUT_REF_AND_RESET(writer_clock_class);
- if (!writer_clock_value) {
+ if (!writer_clock_snapshot) {
BT_LOGE_STR("Failed to create clock value.");
goto error;
}
- ret = bt_event_set_clock_value(writer_event, writer_clock_value);
- BT_OBJECT_PUT_REF_AND_RESET(writer_clock_value);
+ ret = bt_event_set_clock_snapshot(writer_event, writer_clock_snapshot);
+ BT_OBJECT_PUT_REF_AND_RESET(writer_clock_snapshot);
if (ret) {
BT_LOGE_STR("Failed to set clock value.");
goto error;
}
BT_HIDDEN
-enum bt_component_status ctf_copy_trace(FILE *err, const bt_trace *trace,
+bt_component_status ctf_copy_trace(FILE *err, const bt_trace *trace,
const bt_trace *writer_trace)
{
- enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
+ bt_component_status ret = BT_COMPONENT_STATUS_OK;
int field_count, i, int_ret;
bt_field_type *header_type = NULL;
- enum bt_byte_order order;
+ bt_byte_order order;
const char *trace_name;
const unsigned char *trace_uuid;