X-Git-Url: https://git.efficios.com/?a=blobdiff_plain;f=formats%2Fctf%2Fir%2Fevent.c;h=535d7b24ba01cd7d28321008e42920f3472deedb;hb=78586d8a10bfb11d34d187697ae15e9255c6ddf4;hp=3ea59eaac7a9281b250a1b8302a0ad101023d370;hpb=663618eed7aae79f22d8649f677bf13a3bb76771;p=babeltrace.git diff --git a/formats/ctf/ir/event.c b/formats/ctf/ir/event.c index 3ea59eaa..535d7b24 100644 --- a/formats/ctf/ir/event.c +++ b/formats/ctf/ir/event.c @@ -600,6 +600,27 @@ void bt_ctf_event_destroy(struct bt_object *obj) g_free(event); } +uint64_t bt_ctf_event_get_clock_value(struct bt_ctf_event *event, + struct bt_ctf_clock *clock) +{ + uint64_t ret = -1ULL; + uint64_t *clock_value; + + if (!event || !clock) { + goto end; + } + + clock_value = g_hash_table_lookup(event->clock_values, clock); + if (!clock_value) { + goto end; + } + + ret = *clock_value; + +end: + return ret; +} + static int set_integer_field_value(struct bt_ctf_field* field, uint64_t value) { @@ -856,24 +877,3 @@ int bt_ctf_event_register_stream_clock_values(struct bt_ctf_event *event) return ret; } - -uint64_t bt_ctf_event_get_clock_value(struct bt_ctf_event *event, - struct bt_ctf_clock *clock) -{ - uint64_t ret = -1ULL; - uint64_t *clock_value; - - if (!event || !clock) { - goto end; - } - - clock_value = g_hash_table_lookup(event->clock_values, clock); - if (!clock_value) { - goto end; - } - - ret = *clock_value; - -end: - return ret; -}