44 void start(
int interval,
const std::function<
void(
void*)>& func,
void* userData);
56 std::atomic<
int> _interval{ 0 };
58 std::atomic<bool> _execute{
false };
Manages a thread which calls a specified function at a specified interval.
Definition CallbackTimer.hpp:22
~CallbackTimer()
Destructor.
CallbackTimer(CallbackTimer &&)=delete
Move constructor.
void setInterval(int interval)
Set the Interval of the timer.
void start(int interval, const std::function< void(void *)> &func, void *userData)
Starts the timer.
CallbackTimer()=default
Default constructor.
void stop()
Stops the Timer.
CallbackTimer & operator=(const CallbackTimer &)=delete
Copy assignment operator.
CallbackTimer(const CallbackTimer &)=delete
Copy constructor.
bool is_running() const noexcept
Checks if the timer is currently running.
CallbackTimer & operator=(CallbackTimer &&)=delete
Move assignment operator.