31 const int64_t wait_tim_us = 1000000L * (period - elapsed_tim);
32 if (wait_tim_us < 0)
return false;
33 std::this_thread::sleep_for(std::chrono::microseconds(wait_tim_us));
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
#define ASSERT_ABOVE_(__A, __B)
bool sleep()
Sleeps for some time, such as the return of this method is 1/rate (seconds) after the return of the p...
void setRate(const double rate_hz)
Changes the object loop rate (Hz)
virtual ~CRateTimer()
Dtor.
void Tic()
Starts the stopwatch.
mrpt::utils::CTicTac m_tictac
CRateTimer(const double rate_hz=1.0)
Ctor: specifies the desired rate (Hz)
double Tac()
Stops the stopwatch.