Public Types

using clock_type = std::chrono::steady_clock

Public Member Functions

 TimerThread (const TimerThread &)=delete
void schedule (std::function< void()> func, clock_type::time_point when, std::shared_ptr< IActionDispatcher > dispatcher=nullptr)
 Set a function to be executed at the given time point. More...

Static Public Member Functions

static TimerThreadgetInstance ()

Member Function Documentation

◆ schedule()

void Stormancer::TimerThread::schedule ( std::function< void()>  func,
clock_type::time_point  when,
std::shared_ptr< IActionDispatcher dispatcher = nullptr 

Set a function to be executed at the given time point.

funcFunction to be executed.
whenTime point when the function will be executed. This is not guaranteed to be 100% precise.
dispatcherDispatcher that func will be run on. Leave it to nullptr to use the default dispatcher.

The documentation for this class was generated from the following file:
  • stormancer/stormancer-sources/include/public/stormancer/TimerThread.h