Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
basic_deadline_timer::expires_at (3 of 3 overloads)

Set the timer's expiry time as an absolute time.

std::size_t expires_at(
    const time_type & expiry_time,
    boost::system::error_code & ec);

This function sets the expiry time. Any pending asynchronous wait operations will be cancelled. The handler for each cancelled operation will be invoked with the boost::asio::error::operation_aborted error code.



The expiry time to be used for the timer.


Set to indicate what error occurred, if any.

Return Value

The number of asynchronous operations that were cancelled.