5 #ifndef BASE_TIMER_IMPL_H_
6 #define BASE_TIMER_IMPL_H__
8 #include <boost/asio/steady_timer.hpp>
9 #include <boost/chrono.hpp>
20 #if __cplusplus >= 201103L
21 timer_.expires_from_now(std::chrono::milliseconds(ms), ec);
23 timer_.expires_from_now(boost::chrono::milliseconds(ms), ec);
28 return timer_.expires_from_now();
31 template <
typename WaitHandler>
39 #endif // BASE_TIMER_IMPL_H__
TimerImpl(boost::asio::io_context &io_service)
void expires_from_now(uint64_t ms, boost::system::error_code &ec)
void cancel(boost::system::error_code &ec)
boost::asio::steady_timer TimerType
TimerType::duration expires_from_now()
void async_wait(WaitHandler handler)