|
ReXGlue SDK
|
#include <rex/platform/timer.h>
Public Types | |
| using | WindowsClock = rex::WinSystemClock |
| using | SteadyClock = std::chrono::steady_clock |
Public Member Functions | |
| virtual bool | SetOnceAfter (rex::HundredNanoseconds rel_time, std::function< void()> opt_callback=nullptr)=0 |
| virtual bool | SetOnceAt (WindowsClock::time_point due_time, std::function< void()> opt_callback=nullptr)=0 |
| virtual bool | SetOnceAt (SteadyClock::time_point due_time, std::function< void()> opt_callback=nullptr)=0 |
| virtual bool | SetRepeatingAfter (rex::HundredNanoseconds rel_time, std::chrono::milliseconds period, std::function< void()> opt_callback=nullptr)=0 |
| virtual bool | SetRepeatingAt (WindowsClock::time_point due_time, std::chrono::milliseconds period, std::function< void()> opt_callback=nullptr)=0 |
| virtual bool | SetRepeatingAt (SteadyClock::time_point due_time, std::chrono::milliseconds period, std::function< void()> opt_callback=nullptr)=0 |
| virtual bool | Cancel ()=0 |
| virtual bool | Reset ()=0 |
| Public Member Functions inherited from rex::platform::WaitHandle | |
| virtual void * | GetNativeHandle () const =0 |
Static Public Member Functions | |
| static std::unique_ptr< Timer > | CreateManualResetTimer () |
| static std::unique_ptr< Timer > | CreateSynchronizationTimer () |
Waitable timer modeled on the Win32 waitable timer. The optional callback runs as a user callback on the thread that set the timer on Windows, and on the timer queue thread on POSIX.
|
pure virtual |
Stops the timer and discards pending callbacks. Waiting threads keep waiting and a signaled timer stays signaled.
|
static |
Creates a timer that stays signaled until a Set call gives it a new due time.
|
static |
Creates a timer that resets after a wait on it completes.
|
pure virtual |
Stops the timer, discards pending callbacks and clears the signal.
|
pure virtual |
Arms the timer to fire once after a delay.
| opt_callback | Function called when the timer fires, may be null. |
|
pure virtual |
Arms the timer to fire once at a steady clock time.
| opt_callback | Function called when the timer fires, may be null. |
|
pure virtual |
Arms the timer to fire once at a Windows clock time.
| opt_callback | Function called when the timer fires, may be null. |
|
pure virtual |
Arms the timer to fire after a delay and then each period until Cancel or a new Set call.
| opt_callback | Function called each time the timer fires, may be null. |
|
pure virtual |
Arms the timer to fire at a steady clock time and then each period.
| opt_callback | Function called each time the timer fires, may be null. |
|
pure virtual |
Arms the timer to fire at a Windows clock time and then each period.
| opt_callback | Function called each time the timer fires, may be null. |