29 : owner (mt), timerID (tid)
55 Timer* MultiTimer::getCallback (
int timerID)
const noexcept
57 for (
int i = timers.size(); --i >= 0;)
61 if (t->timerID == timerID)
72 Timer* timer = getCallback (timerID);
84 if (
Timer*
const t = getCallback (timerID))
92 if (
Timer*
const t = getCallback (timerID))
93 return t->isTimerRunning();
102 if (
Timer*
const t = getCallback (timerID))
103 return t->getTimerInterval();
void startTimer(int intervalInMilliseconds) noexcept
Starts the timer and sets the length of interval required.
MultiTimer() noexcept
Creates a MultiTimer.
virtual ~MultiTimer()
Destructor.
void stopTimer(int timerID) noexcept
Stops a timer.
A type of timer class that can run multiple timers with different frequencies, all of which share a s...
int getTimerInterval(int timerID) const noexcept
Returns the interval for a specified timer ID.
virtual void timerCallback(int timerID)=0
The user-defined callback routine that actually gets called by each of the timers that are running...
bool isTimerRunning(int timerID) const noexcept
Checks whether a timer has been started for a specified ID.
void startTimer(int timerID, int intervalInMilliseconds) noexcept
Starts a timer and sets the length of interval required.
Automatically locks and unlocks a mutex object.
Makes repeated callbacks to a virtual method at a specified time interval.
void timerCallback() override
The user-defined callback routine that actually gets called periodically.