11 #ifndef NDN_UTIL_MONOTONIC_DEADLINE_TIMER_HPP
12 #define NDN_UTIL_MONOTONIC_DEADLINE_TIMER_HPP
14 #include <boost/asio.hpp>
21 struct time_traits<ndn::time::steady_clock::TimePoint::clock>
24 typedef ndn::time::steady_clock::TimePoint::clock::duration
duration_type;
29 return ndn::time::steady_clock::now();
35 return time + duration;
41 return timeLhs - timeRhs;
47 return timeLhs < timeRhs;
50 static boost::posix_time::time_duration
54 #ifdef BOOST_DATE_TIME_HAS_NANOSECONDS
55 boost::posix_time::nanoseconds(
56 ndn::time::duration_cast<ndn::time::nanoseconds>(duration).count())
58 boost::posix_time::microseconds(
59 ndn::time::duration_cast<ndn::time::microseconds>(duration).count())
74 #endif // NDN_UTIL_MONOTONIC_DEADLINE_TIMER_HPP
static duration_type subtract(const time_type &timeLhs, const time_type &timeRhs)
static time_type add(const time_type &time, const duration_type &duration)
static bool less_than(const time_type &timeLhs, const time_type &timeRhs)
boost::asio::basic_deadline_timer< time::steady_clock::TimePoint::clock > monotonic_deadline_timer
ndn::time::steady_clock::TimePoint::clock::duration duration_type
static boost::posix_time::time_duration to_posix_duration(const duration_type &duration)
ndn::time::steady_clock::TimePoint time_type