double rate() const
Gets current rate (Hz)
A high-performance stopwatch, with typical resolution of nanoseconds.
mrpt::system::CTicTac m_tictac
bool sleep()
Sleeps for some time, such as the return of this method is 1/rate (seconds) after the return of the p...
A class for calling sleep() in a loop, such that the amount of sleep time will be computed to make th...
CRateTimer(const double rate_hz=1.0)
Ctor: specifies the desired rate (Hz)
void setRate(const double rate_hz)
Changes the object loop rate (Hz)
virtual ~CRateTimer()=default
Dtor.
Page generated by Doxygen 1.8.17 for MRPT 2.0.4 at Sun Jul 19 17:54:30 UTC 2020 | |