Default service implementation for a timer. More...
#include <waitable_timer_service.hpp>
Public Types | |
typedef Clock | clock_type |
The clock type. More... | |
typedef clock_type::duration | duration |
The duration type of the clock. More... | |
typedef clock_type::time_point | time_point |
The time point type of the clock. More... | |
typedef WaitTraits | traits_type |
The wait traits type. More... | |
typedef service_impl_type::implementation_type | implementation_type |
The implementation type of the waitable timer. More... | |
Public Member Functions | |
waitable_timer_service (boost::asio::io_service &io_service) | |
Construct a new timer service for the specified io_service. More... | |
void | construct (implementation_type &impl) |
Construct a new timer implementation. More... | |
void | destroy (implementation_type &impl) |
Destroy a timer implementation. More... | |
std::size_t | cancel (implementation_type &impl, boost::system::error_code &ec) |
Cancel any asynchronous wait operations associated with the timer. More... | |
std::size_t | cancel_one (implementation_type &impl, boost::system::error_code &ec) |
Cancels one asynchronous wait operation associated with the timer. More... | |
time_point | expires_at (const implementation_type &impl) const |
Get the expiry time for the timer as an absolute time. More... | |
std::size_t | expires_at (implementation_type &impl, const time_point &expiry_time, boost::system::error_code &ec) |
Set the expiry time for the timer as an absolute time. More... | |
duration | expires_from_now (const implementation_type &impl) const |
Get the expiry time for the timer relative to now. More... | |
std::size_t | expires_from_now (implementation_type &impl, const duration &expiry_time, boost::system::error_code &ec) |
Set the expiry time for the timer relative to now. More... | |
void | wait (implementation_type &impl, boost::system::error_code &ec) |
template<typename WaitHandler > | |
BOOST_ASIO_INITFN_RESULT_TYPE (WaitHandler, void(boost::system::error_code)) async_wait(implementation_type &impl | |
BOOST_ASIO_MOVE_ARG (WaitHandler) handler) | |
boost::asio::io_service & | get_io_service () |
Get the io_service object that owns the service. More... | |
Static Public Attributes | |
static boost::asio::detail::service_id < waitable_timer_service < Clock, WaitTraits > > | id |
Default service implementation for a timer.
typedef Clock boost::asio::waitable_timer_service< Clock, WaitTraits >::clock_type |
The clock type.
typedef clock_type::duration boost::asio::waitable_timer_service< Clock, WaitTraits >::duration |
The duration type of the clock.
typedef service_impl_type::implementation_type boost::asio::waitable_timer_service< Clock, WaitTraits >::implementation_type |
The implementation type of the waitable timer.
typedef clock_type::time_point boost::asio::waitable_timer_service< Clock, WaitTraits >::time_point |
The time point type of the clock.
typedef WaitTraits boost::asio::waitable_timer_service< Clock, WaitTraits >::traits_type |
The wait traits type.
|
inlineexplicit |
Construct a new timer service for the specified io_service.
boost::asio::waitable_timer_service< Clock, WaitTraits >::BOOST_ASIO_INITFN_RESULT_TYPE | ( | WaitHandler | , |
void(boost::system::error_code) | |||
) |
|
inline |
|
inline |
Cancel any asynchronous wait operations associated with the timer.
|
inline |
Cancels one asynchronous wait operation associated with the timer.
|
inline |
Construct a new timer implementation.
|
inline |
Destroy a timer implementation.
|
inline |
Get the expiry time for the timer as an absolute time.
|
inline |
Set the expiry time for the timer as an absolute time.
|
inline |
Get the expiry time for the timer relative to now.
|
inline |
Set the expiry time for the timer relative to now.
|
inherited |
Get the io_service object that owns the service.
|
inline |
|
staticinherited |