|
Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
|
#include <Timer.h>
Classes | |
| class | CTimerThread |
Public Member Functions | |
| CTimer (ITimerCallback *callback) | |
| CTimer (std::function< void()> const &callback) | |
| CTimer (const CTimer &)=delete | |
| CTimer & | operator= (const CTimer &)=delete |
| virtual | ~CTimer () |
| bool | Start (std::chrono::milliseconds timeout, bool interval=false) |
| bool | Stop (bool wait=false) |
| bool | Restart () |
| void | RestartAsync (std::chrono::milliseconds timeout) |
| bool | IsRunning () const |
| float | GetElapsedSeconds () const |
| float | GetElapsedMilliseconds () const |
All timers share one thread, which runs their callbacks one at a time. A callback therefore delays every other timer until it returns, and must not block, for example wait on the main thread.
|
explicit |
|
explicit |
|
delete |
|
virtual |
| float CTimer::GetElapsedMilliseconds | ( | ) | const |
| float CTimer::GetElapsedSeconds | ( | ) | const |
| bool CTimer::IsRunning | ( | ) | const |
| bool CTimer::Restart | ( | ) |
| void CTimer::RestartAsync | ( | std::chrono::milliseconds | timeout | ) |