high_resolution_timer::high_resolution_timer(io_service& io_service,
		const time_type& expiry_time)
		: m_expiration_time(time_type())
		, m_io_service(io_service)
		, m_expired(true)
	{
		expires_at(expiry_time);
	}
 // Set the expiry time for the timer relative to now.
 std::size_t expires_after(implementation_type& impl,
     const duration_type& expiry_time, asio::error_code& ec)
 {
   return expires_at(impl,
       Time_Traits::add(Time_Traits::now(), expiry_time), ec);
 }
 /**
  * @return A relative time value representing the stream buffer's expiry time.
  */
 duration_type expires_from_now() const
 {
   return traits_helper::subtract(expires_at(), traits_helper::now());
 }
 // Set the expiry time for the timer relative to now.
 std::size_t expires_from_now(implementation_type& impl,
     const duration_type& expiry_time, pdalboost::system::error_code& ec)
 {
   return expires_at(impl,
       Time_Traits::add(Time_Traits::now(), expiry_time), ec);
 }
 // Get the expiry time for the timer relative to now.
 duration_type expires_from_now(const implementation_type& impl) const
 {
   return Time_Traits::subtract(expires_at(impl), Time_Traits::now());
 }
	std::size_t high_resolution_timer::expires_at(const high_resolution_timer::time_type& expiry_time)
	{
		boost::system::error_code ec;
		return expires_at(expiry_time, ec);
	}
 /**
  * @return A relative time value representing the stream buffer's expiry time.
  */
 duration_type expires_from_now() const
 {
   return TimeTraits::subtract(expires_at(), TimeTraits::now());
 }
Beispiel #8
0
 std::size_t timer::expires_at( const time_type & expiry_time, boost::system::error_code & ec )
 {
     ec = boost::system::error_code();
     return expires_at( expiry_time );
 }