6 #ifndef BASE_TIMER_IMPL_H_
7 #define BASE_TIMER_IMPL_H__
9 #include <boost/asio/steady_timer.hpp>
10 #include <boost/chrono.hpp>
21 #if __cplusplus >= 201103L
22 timer_.expires_from_now(std::chrono::milliseconds(ms), ec);
24 timer_.expires_from_now(boost::chrono::milliseconds(ms), ec);
29 return timer_.expires_from_now();
32 template <
typename WaitHandler>
TimerImpl(boost::asio::io_context &io_service)
void expires_from_now(uint64_t ms, boost::system::error_code &ec)
TimerType::duration expires_from_now()
void cancel(boost::system::error_code &ec)
void async_wait(WaitHandler handler)
boost::asio::steady_timer TimerType