It really is the offset a clock (clock class instance).
Also, "offset" -> "offset from origin".
This is in preparation of CTF 2 support (including libbabeltrace2
changes), where the concept of origin is more defined.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Id623085ae2194a452d2b9b07a8be17395324a5d5
} /* namespace internal */
} /* namespace internal */
-class ClockClassOffset final
- explicit ClockClassOffset(const std::int64_t seconds, const std::uint64_t cycles) :
+ explicit ClockOffset(const std::int64_t seconds, const std::uint64_t cycles) :
_mSeconds {seconds}, _mCycles {cycles}
{
}
_mSeconds {seconds}, _mCycles {cycles}
{
}
return bt_clock_class_get_frequency(this->libObjPtr());
}
return bt_clock_class_get_frequency(this->libObjPtr());
}
- void offset(const ClockClassOffset& offset) const noexcept
+ void offsetFromOrigin(const ClockOffset& offsetFromOrigin) const noexcept
{
static_assert(!std::is_const<LibObjT>::value, "Not available with `bt2::ConstClockClass`.");
{
static_assert(!std::is_const<LibObjT>::value, "Not available with `bt2::ConstClockClass`.");
- bt_clock_class_set_offset(this->libObjPtr(), offset.seconds(), offset.cycles());
+ bt_clock_class_set_offset(this->libObjPtr(), offsetFromOrigin.seconds(),
+ offsetFromOrigin.cycles());
- ClockClassOffset offset() const noexcept
+ ClockOffset offsetFromOrigin() const noexcept
{
std::int64_t seconds;
std::uint64_t cycles;
bt_clock_class_get_offset(this->libObjPtr(), &seconds, &cycles);
{
std::int64_t seconds;
std::uint64_t cycles;
bt_clock_class_get_offset(this->libObjPtr(), &seconds, &cycles);
- return ClockClassOffset {seconds, cycles};
+ return ClockOffset {seconds, cycles};
}
void precision(const std::uint64_t precision) const noexcept
}
void precision(const std::uint64_t precision) const noexcept