94 void stop(
bool bDisableTimer =
false);
198 void timerThread(std::chrono::milliseconds timeToWaitInMs);
Definition: GameInstance.h:32
std::string sTimerName
Definition: Timer.h:213
void stop(bool bDisableTimer=false)
Definition: Timer.cpp:115
bool bIsRunning
Definition: Timer.h:243
void timerThread(std::chrono::milliseconds timeToWaitInMs)
Definition: Timer.cpp:196
void setEnable(bool bEnable)
Definition: Timer.cpp:23
bool isEnabled()
Definition: Timer.cpp:191
std::condition_variable cvTerminateTimerThread
Definition: Timer.h:228
bool isRunning()
Definition: Timer.cpp:181
std::optional< std::function< bool(size_t)> > callbackValidator
Definition: Timer.h:210
void setCallbackValidator(const std::function< bool(size_t)> &validator)
Definition: Timer.cpp:13
size_t iStartCount
Definition: Timer.h:222
std::optional< std::function< void()> > callbackForTimeout
Definition: Timer.h:204
std::string getName() const
Definition: Timer.cpp:174
bool bIsLooping
Definition: Timer.h:252
bool bIsEnabled
Definition: Timer.h:249
std::mutex mtxTerminateTimerThread
Definition: Timer.h:225
std::pair< std::mutex, std::optional< std::chrono::steady_clock::time_point > > mtxTimeWhenStarted
Definition: Timer.h:219
std::optional< long long > elapsedTimeWhenStopped
Definition: Timer.h:237
bool isStopped()
Definition: Timer.cpp:186
long long iTimeToWaitInMs
Definition: Timer.h:240
size_t getStartCount()
Definition: Timer.cpp:176
void start()
Definition: Timer.cpp:77
std::atomic_flag bIsShuttingDown
Definition: Timer.h:231
std::optional< std::future< void > > timerThreadFuture
Definition: Timer.h:201
void setCallbackForTimeout(long long iTimeToWaitInMs, const std::function< void()> &callback, bool bIsLooping=false)
Definition: Timer.cpp:50
std::optional< long long > getElapsedTimeInMs()
Definition: Timer.cpp:155
std::atomic_flag bIsStopRequested
Definition: Timer.h:234