Boost C++ Libraries

...one 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 to view this page for the latest version.
PrevUpHomeNext
basic_waitable_timer::expires_at (2 of 3 overloads)

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

std::size_t expires_at(
    const time_point & expiry_time);

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.

Parameters

expiry_time

The expiry time to be used for the timer.

Return Value

The number of asynchronous operations that were cancelled.

Exceptions

boost::system::system_error

Thrown on failure.

Remarks

If the timer has already expired when expires_at() is called, then the handlers for asynchronous wait operations will:

These handlers can no longer be cancelled, and therefore are passed an error code that indicates the successful completion of the wait operation.


PrevUpHomeNext