29 const int64_t wait_tim_us = 1000000L * (period - elapsed_tim);
30 if (elapsed_tim > period)
35 std::this_thread::sleep_for(std::chrono::microseconds(wait_tim_us));
double Tac() noexcept
Stops the stopwatch.
bool sleep()
Sleeps for some time, such as the return of this method is 1/rate (seconds) after the return of the p...
CRateTimer(const double rate_hz=1.0)
Ctor: specifies the desired rate (Hz)
mrpt::system::CTicTac m_tictac
void setRate(const double rate_hz)
Changes the object loop rate (Hz)
#define ASSERT_ABOVE_(__A, __B)
void Tic() noexcept
Starts the stopwatch.