|
| | SyncTimeout (ActiveTimers *timers) |
| |
| void | wait_for_notification () |
| | Blocks the current thread's execution until the timeout is expired or triggered.
|
| |
| | Timer (ActiveTimers *timers) |
| | Constructor.
|
| |
| | ~Timer () |
| | Destructor.
|
| |
| void | run () override |
| | Callback from the executor when this timer is scheduled.
|
| |
| long long | schedule_time () |
| |
| void | start (long long period=-1) |
| | Starts a timer.
|
| |
| void | start_absolute (long long expiry_time_nsec) |
| | Starts the timer with an absolute deadline.
|
| |
| void | restart () |
| | Restart a timer with the existing period but from the current time.
|
| |
| void | trigger () |
| | This will wakeup the timer prematurely, immediately.
|
| |
| void | ensure_triggered () |
| | Triggers the timer if it is not expired yet.
|
| |
| void | cancel () |
| | Dangerous, do not call.
|
| |
| bool | is_triggered () |
| |
| void | set_triggered () |
| | Sets the timer as if it was woken up by a trigger(), even if it was never started.
|
| |
| void | test_deletion () |
| |
| void | notify () override |
| | Crashes the program – everyone who is expecting notify calls must override this function.
|
| |
| virtual void | alloc_result (QMember *item) |
| | Return the result of an alloc_async() from a memory Pool.
|
| |
| void | init () |
| | Initiailize a QMember, in place of a public placement construction.
|
| |
Class usable by synchronous code to utilize a timeout.
usage: SyncTimeout t; t.start(MSEC_TO_NSEC(100)); t.wait_for_notification(); if (t.is_triggered()) { call was success – response arrived } else { failure – timeout }
Definition at line 330 of file Timer.hxx.