boost::corosio::native_timer
An asynchronous timer with devirtualized wait operations.
Synopsis
template<auto Backend>
class native_timer
: public timer
Description
This class template inherits from timer and shadows the wait operation with a version that calls the backend implementation directly, allowing the compiler to inline through the entire call chain.
Non‐async operations (cancel, expires_at, expires_after) remain unchanged and dispatch through the compiled library.
A native_timer IS‐A timer and can be passed to any function expecting timer&.
Thread Safety
Same as timer.
Types
Name |
Description |
RAII wrapper for I/O object implementation lifetime. |
|
Backend interface for timer wait operations. |
|
Service interface for I/O object lifecycle management. |
Type Aliases
Name |
Description |
The clock type used for time operations. |
|
The duration type for relative expiry times. |
|
Alias for backward compatibility. |
|
The time point type for absolute expiry times. |
Member Functions
Name |
Description |
|
Constructors |
|
Assignment operators |
Cancel all pending asynchronous wait operations. |
|
Cancel one pending asynchronous wait operation. |
|
Return the execution context. |
|
Set the timer's expiry time relative to now. |
|
Set the timer's expiry time as an absolute time. |
|
Return the timer's expiry time as an absolute time. |
|
Wait for the timer to expire. |
Protected Member Functions
Name |
Description |
|
Assignment operators |
|
Dispatch cancel to the concrete implementation. |
Return the underlying implementation. |
Protected Static Member Functions
Name |
Description |
Create a handle bound to a service found in the context. |
Template Parameters
Name |
Description |
Backend |
A backend tag value (e.g., |
See Also
timer, epoll_t, iocp_t
Created with MrDocs