Clock to get date/time from a specific clock type or wait for certain durations or until certain date...
Represents a point in time.
Simple rate limiter for use in loops to maintain a certain frequency given a clock.
Duration waitForNextTick() const
Wait and block until the target period is met.
NextTickMode
Modes that influence how the reset method should function for the next waitForNextTick() method call.
@ wait_for_next_tick
If waitForNextTicK() is called shortly after reset() (or any constructor), the metronome will wait fo...
@ tick_immediately
If waitForNextTicK() is called shortly after reset() (or any constructor), the metronome will not wai...
Metronome(const Frequency &targetFrequency, ClockType clockType=ClockType::Virtual, NextTickMode mode=NextTickMode::wait_for_next_tick)
void reset(NextTickMode mode=NextTickMode::wait_for_next_tick) const
Resets the rate limiter so that the next targetted time point will be in the current time plus the ta...
ClockType
Describes the type of clock.
@ Virtual
Time given by time server if configured, realtime otherwise.
This file offers overloads of toIce() and fromIce() functions for STL container types.