Public Member Functions |
void | reset (void) |
| Reset triggered conditional.
|
void | signal (void) |
| Signal pending event.
|
| TimedEvent (void) |
| Create event handler and timer for timing of events.
|
| TimedEvent (timeout_t timeout) |
| Create event handler and timer set to trigger a timeout.
|
| TimedEvent (time_t timeout) |
| Create event handler and timer set to trigger a timeout.
|
bool | wait (timeout_t timeout) |
| Wait to be signalled or until timer expires.
|
void | wait (void) |
| A simple wait until triggered.
|
| ~TimedEvent () |
| Destroy timer and release pending events.
|
void | clear (void) |
| Clear pending timer, has no value.
|
timeout_t | get (void) |
| Get remaining time until the timer expires.
|
bool | isExpired (void) |
| Check if timer expired.
|
bool | isUpdated (void) |
| Check if timer has been updated since last check.
|
| operator bool () |
| Check if timer expired for is() expression.
|
bool | operator! () |
| Check if timer has expired.
|
bool | operator!= (Timer &timer) |
| Compare timers if not same timeout.
|
timeout_t | operator* () |
| Get remaining time until timer expires by reference.
|
Timer & | operator+= (time_t expire) |
| Adjust timer expiration.
|
Timer & | operator+= (timeout_t expire) |
| Adjust timer expiration.
|
timeout_t | operator- (Timer &timer) |
| Compute difference between two timers.
|
Timer & | operator-= (time_t expire) |
| Adjust timer expiration.
|
Timer & | operator-= (timeout_t expire) |
| Adjust timer expiration.
|
bool | operator< (Timer &timer) |
| Compare timers if earlier timeout than another timer.
|
bool | operator<= (Timer &timer) |
| Compare timers if earlier than or equal to another timer.
|
Timer & | operator= (time_t expire) |
| Set timer expiration.
|
Timer & | operator= (timeout_t expire) |
| Set timer expiration.
|
bool | operator== (Timer &timer) |
| Compare timers if same timeout.
|
bool | operator> (Timer &timer) |
| Compare timers if later timeout than another timer.
|
bool | operator>= (Timer &timer) |
| Compare timers if later than or equal to another timer.
|
void | set (timeout_t expire) |
| Set the timer to expire.
|
void | set (time_t expire) |
| Set the timer to expire.
|
void | set (void) |
| Set (update) the timer with current time.
|
| Timer () |
| Construct an untriggered timer set to the time of creation.
|
| Timer (timeout_t offset) |
| Construct a triggered timer that expires at specified offset.
|
| Timer (time_t offset) |
| Construct a triggered timer that expires at specified offset.
|
| Timer (Timer ©) |
| Construct a timer from a copy of another timer.
|
Event notification to manage scheduled realtime threads.
The timer is advanced to sleep threads which then wakeup either when the timer has expired or they are notified through the signal handler. This can be used to schedule and signal one-time completion handlers or for time synchronized events signaled by an asychrononous I/O or event source.
- Author:
- David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org
Definition at line 365 of file thread.h.