CppCMS
Public Member Functions | Friends
booster::aio::deadline_timer Class Reference

A timer object. More...

#include <booster/booster/aio/deadline_timer.h>

Inheritance diagram for booster::aio::deadline_timer:
booster::noncopyable

List of all members.

Public Member Functions

 deadline_timer ()
 deadline_timer (io_service &srv)
io_serviceget_io_service ()
void set_io_service (io_service &srv)
void reset_io_service ()
void expires_from_now (ptime t)
ptime expires_from_now ()
void expires_at (ptime t)
ptime expires_at ()
void wait ()
void async_wait (event_handler const &h)
void cancel ()

Friends

struct waiter

Detailed Description

A timer object.


Constructor & Destructor Documentation

Create a new timer object

Create a new timer object connected to the io_service srv


Member Function Documentation

Wait asynchronously for the timer.

If io_service is not assigned throws system::system_error, all other errors reported via h

Cancel asynchronous operation. The active handler is immediately scheduled for execution with booster::aio::aio_error::cancel error code in booster::aio::aio_error_cat category.

It allows to distinguish between operation cancellation and normal completion

Set an absolute expiration time

If the function is called during the wait operation the behavior is undefined

Get an absolute expiration time

Set an expiration time relativelty to the current point with an offset t

If the function is called during the wait operation the behavior is undefined

Get an expiration time relativelty to the current point with an offset t

Returns the connected io_service, throws system::system_error if no io_service connected

Unsets the io_service. Cancels all pending asynchronous operations on the connected io_service.

Sets new io_service. Cancels all pending asynchronous operations on the connected io_service.

Wait synchronously for the timer


The documentation for this class was generated from the following file: