| Home | Libraries | People | FAQ | More

# boost::asio::deadline_timer_service< Time_Type, Time_Traits > Class Template Reference

Inherits boost::asio::io_service::service.

Inheritance diagram for boost::asio::deadline_timer_service< Time_Type, Time_Traits >:

List of all members.

## Detailed Description

### template<typename Time_Type, typename Time_Traits = boost::asio::time_traits<Time_Type>>
class boost::asio::deadline_timer_service< Time_Type, Time_Traits >

Default service implementation for a timer.

## Public Types

typedef Time_Traits | traits_type
| The time traits type.
typedef traits_type::time_type | time_type
| The time type.
typedef traits_type::duration_type | duration_type
| The duration type.
typedef implementation_defined | implementation_type
| The implementation type of the deadline timer.

## Public Member Functions

| deadline_timer_service (boost::asio::io_service &io_service)
| Construct a new timer service for the specified io_service.
void | shutdown_service ()
| Destroy all user-defined handler objects owned by the service.
void | construct (implementation_type &impl)
| Construct a new timer implementation.
void | destroy (implementation_type &impl)
| Destroy a timer implementation.
std::size_t | cancel (implementation_type &impl)
| Cancel any asynchronous wait operations associated with the timer.
time_type | expires_at (const implementation_type &impl) const
| Get the expiry time for the timer as an absolute time.
std::size_t | expires_at (implementation_type &impl, const time_type &expiry_time)
| Set the expiry time for the timer as an absolute time.
duration_type | expires_from_now (const implementation_type &impl) const
| Get the expiry time for the timer relative to now.
std::size_t | expires_from_now (implementation_type &impl, const duration_type &expiry_time)
| Set the expiry time for the timer relative to now.
io_service & | owner ()
| Get the io_service object that owns the service.

## Member Typedef Documentation

template<typename Time_Type, typename Time_Traits = boost::asio::time_traits<Time_Type>>

typedef Time_Traits boost::asio::deadline_timer_service< Time_Type, Time_Traits >::traits_type

The time traits type.

template<typename Time_Type, typename Time_Traits = boost::asio::time_traits<Time_Type>>

typedef traits_type::time_type boost::asio::deadline_timer_service< Time_Type, Time_Traits >::time_type

The time type.

template<typename Time_Type, typename Time_Traits = boost::asio::time_traits<Time_Type>>

typedef traits_type::duration_type boost::asio::deadline_timer_service< Time_Type, Time_Traits >::duration_type

The duration type.

template<typename Time_Type, typename Time_Traits = boost::asio::time_traits<Time_Type>>

typedef implementation_defined boost::asio::deadline_timer_service< Time_Type, Time_Traits >::implementation_type

The implementation type of the deadline timer.

## Constructor & Destructor Documentation

template<typename Time_Type, typename Time_Traits = boost::asio::time_traits<Time_Type>>

boost::asio::deadline_timer_service< Time_Type, Time_Traits >::deadline_timer_service | ( | boost::asio::io_service & | io_service | ) | `[explicit]`

Construct a new timer service for the specified io_service.

## Member Function Documentation

template<typename Time_Type, typename Time_Traits = boost::asio::time_traits<Time_Type>>

void boost::asio::deadline_timer_service< Time_Type, Time_Traits >::shutdown_service | ( |  | ) | `[virtual]`

Destroy all user-defined handler objects owned by the service.

Implements boost::asio::io_service::service.

template<typename Time_Type, typename Time_Traits = boost::asio::time_traits<Time_Type>>

void boost::asio::deadline_timer_service< Time_Type, Time_Traits >::construct | ( | implementation_type & | impl | ) |

Construct a new timer implementation.

template<typename Time_Type, typename Time_Traits = boost::asio::time_traits<Time_Type>>

void boost::asio::deadline_timer_service< Time_Type, Time_Traits >::destroy | ( | implementation_type & | impl | ) |

Destroy a timer implementation.

template<typename Time_Type, typename Time_Traits = boost::asio::time_traits<Time_Type>>

std::size_t boost::asio::deadline_timer_service< Time_Type, Time_Traits >::cancel | ( | implementation_type & | impl | ) |

Cancel any asynchronous wait operations associated with the timer.

template<typename Time_Type, typename Time_Traits = boost::asio::time_traits<Time_Type>>

time_type boost::asio::deadline_timer_service< Time_Type, Time_Traits >::expires_at | ( | const implementation_type & | impl | ) | const

Get the expiry time for the timer as an absolute time.

template<typename Time_Type, typename Time_Traits = boost::asio::time_traits<Time_Type>>

std::size_t boost::asio::deadline_timer_service< Time_Type, Time_Traits >::expires_at | ( | implementation_type & | impl,
|  | const time_type & | expiry_time |
| ) |  |  |

Set the expiry time for the timer as an absolute time.

template<typename Time_Type, typename Time_Traits = boost::asio::time_traits<Time_Type>>

duration_type boost::asio::deadline_timer_service< Time_Type, Time_Traits >::expires_from_now | ( | const implementation_type & | impl | ) | const

Get the expiry time for the timer relative to now.

template<typename Time_Type, typename Time_Traits = boost::asio::time_traits<Time_Type>>

std::size_t boost::asio::deadline_timer_service< Time_Type, Time_Traits >::expires_from_now | ( | implementation_type & | impl,
|  | const duration_type & | expiry_time |
| ) |  |  |

Set the expiry time for the timer relative to now.

io_service & boost::asio::io_service::service::owner | ( |  | ) | `[inherited]`

Get the io_service object that owns the service.

| Copyright © 2003 - 2006 Christopher M. Kohlhoff