X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fformat-internal.h;h=9d5ba3307645edb1d1acd9648e9202b384a4211b;hb=f3985ab106d89d8e764c1a8dd0c8bda09b755d10;hp=e0359eacdf95b86caa095b964304c84971430b78;hpb=8099326b3438eb003bf3f9849ad1b3cd1f0d618c;p=babeltrace.git diff --git a/include/babeltrace/format-internal.h b/include/babeltrace/format-internal.h index e0359eac..9d5ba330 100644 --- a/include/babeltrace/format-internal.h +++ b/include/babeltrace/format-internal.h @@ -32,6 +32,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { @@ -45,8 +46,20 @@ struct bt_trace_descriptor { struct trace_collection *collection; /* Container of this trace */ GHashTable *clocks; struct ctf_clock *single_clock; /* currently supports only one clock */ + bool interval_set; + struct packet_index_time interval_real; /* Interval of events to consider */ }; +static inline void init_trace_descriptor(struct bt_trace_descriptor *td) { + if (!td) { + return; + } + + td->interval_real.timestamp_begin = INT64_MIN; + td->interval_real.timestamp_end = INT64_MAX; + td->interval_set = false; +} + #ifdef __cplusplus } #endif