A clock's origin is one of, depending on its class:
<dl>
- <dt>If bt_clock_class_origin_is_unknown() returns #BT_TRUE</dt>
+ <dt>If bt_clock_class_origin_is_known() returns #BT_FALSE</dt>
<dd>
Undefined.
<dt>Unknown origin</dt>
<dd>
Use bt_clock_class_set_origin_unknown() and
- bt_clock_class_origin_is_unknown().
+ bt_clock_class_origin_is_known().
</dd>
<dt>Unix epoch origin</dt>
Makes the origin of a clock class the Unix epoch.
@sa bt_clock_class_set_origin() —
Sets the custom origin of a clock class.
-@sa bt_clock_class_origin_is_unknown() —
- Returns whether or not the origin of a clock class is unknown.
+@sa bt_clock_class_origin_is_known() —
+ Returns whether or not the origin of a clock class is known.
*/
extern void
bt_clock_class_set_origin_unknown(bt_clock_class *clock_class) __BT_NOEXCEPT;
/*!
@brief
Returns whether or not the \ref api-tir-clock-cls-origin "origin"
- of the clock class \bt_p{clock_class} is unknown.
+ of the clock class \bt_p{clock_class} is known.
See the \ref api-tir-clock-cls-prop-origin "origin" property.
@param[in] clock_class
- Clock class of which to get whether or not its origin is unknown.
+ Clock class of which to get whether or not its origin is known.
@returns
- #BT_TRUE if the origin of \bt_p{clock_class} is unknown.
+ #BT_TRUE if the origin of \bt_p{clock_class} is known.
@bt_pre_not_null{clock_class}
@sa bt_clock_class_set_origin() —
Sets the custom origin of a clock class.
*/
-extern bt_bool bt_clock_class_origin_is_unknown(
+extern bt_bool bt_clock_class_origin_is_known(
const bt_clock_class *clock_class) __BT_NOEXCEPT;
/*!
@bt_pre_not_null{clock_class}
-@sa bt_clock_class_origin_is_unknown() —
- Returns whether or not the origin of a clock class is unknown.
+@sa bt_clock_class_origin_is_known() —
+ Returns whether or not the origin of a clock class is known.
@sa bt_clock_class_set_origin_unknown() —
Makes the origin of a clock class unknown.
@sa bt_clock_class_set_origin_unix_epoch() —
}
BT_EXPORT
-bt_bool bt_clock_class_origin_is_unknown(const struct bt_clock_class *clock_class)
+bt_bool bt_clock_class_origin_is_known(const struct bt_clock_class *clock_class)
{
BT_ASSERT_PRE_NO_ERROR();
BT_ASSERT_PRE_DEV_CLK_CLS_NON_NULL(clock_class);
- return !clock_class->origin.ns && !clock_class->origin.name &&
- !clock_class->origin.uid;
+ return clock_class->origin.name && clock_class->origin.uid;
}
BT_EXPORT
write_int_prop_line(ctx, "Offset from origin (s)", offset_seconds);
write_uint_prop_line(ctx, "Offset from origin (cycles)", offset_cycles);
- if (!bt_clock_class_origin_is_unknown(cc)) {
+ if (bt_clock_class_origin_is_known(cc)) {
write_prop_name_line(ctx, "Origin");
if (bt_clock_class_origin_is_unix_epoch(cc)) {