diff --git a/src/util/detail/monotonic-deadline-timer.hpp b/src/util/detail/monotonic-deadline-timer.hpp
deleted file mode 100644
index 002912c..0000000
--- a/src/util/detail/monotonic-deadline-timer.hpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2013-2017 Regents of the University of California.
- *
- * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
- *
- * ndn-cxx library is free software: you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later version.
- *
- * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
- *
- * You should have received copies of the GNU General Public License and GNU Lesser
- * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
- */
-
-/**
- * This code is based on https://svn.boost.org/trac/boost/attachment/ticket/3504/MonotonicDeadlineTimer.h
- */
-
-#ifndef NDN_UTIL_DETAIL_MONOTONIC_DEADLINE_TIMER_HPP
-#define NDN_UTIL_DETAIL_MONOTONIC_DEADLINE_TIMER_HPP
-
-#include "../time.hpp"
-#include <boost/asio/basic_deadline_timer.hpp>
-#include <boost/asio/io_service.hpp>
-
-namespace boost {
-namespace asio {
-
-template<>
-struct time_traits<ndn::time::steady_clock>
-{
-  using time_type     = ndn::time::steady_clock::TimePoint;
-  using duration_type = ndn::time::steady_clock::Duration;
-
-  static time_type
-  now()
-  {
-    return ndn::time::steady_clock::now();
-  }
-
-  static time_type
-  add(const time_type& time, const duration_type& duration)
-  {
-    return time + duration;
-  }
-
-  static duration_type
-  subtract(const time_type& timeLhs, const time_type& timeRhs)
-  {
-    return timeLhs - timeRhs;
-  }
-
-  static bool
-  less_than(const time_type& timeLhs, const time_type& timeRhs)
-  {
-    return timeLhs < timeRhs;
-  }
-
-  static boost::posix_time::time_duration
-  to_posix_duration(const duration_type& duration)
-  {
-    return ndn::time::steady_clock::to_posix_duration(duration);
-  }
-};
-
-} // namespace asio
-} // namespace boost
-
-namespace ndn {
-namespace util {
-namespace detail {
-
-class MonotonicDeadlineTimer : public boost::asio::basic_deadline_timer<time::steady_clock>
-{
-public:
-  MonotonicDeadlineTimer(boost::asio::io_service& ioService)
-    : boost::asio::basic_deadline_timer<time::steady_clock>(ioService)
-  {
-  }
-};
-
-} // namespace detail
-} // namespace util
-} // namespace ndn
-
-#endif // NDN_UTIL_DETAIL_MONOTONIC_DEADLINE_TIMER_HPP
diff --git a/src/util/detail/steady-timer.hpp b/src/util/detail/steady-timer.hpp
new file mode 100644
index 0000000..4fb4e27
--- /dev/null
+++ b/src/util/detail/steady-timer.hpp
@@ -0,0 +1,60 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2013-2018 Regents of the University of California.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ *
+ * ndn-cxx library is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License and GNU Lesser
+ * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ */
+
+#ifndef NDN_UTIL_DETAIL_STEADY_TIMER_HPP
+#define NDN_UTIL_DETAIL_STEADY_TIMER_HPP
+
+#include "../time.hpp"
+
+#include <boost/asio/basic_waitable_timer.hpp>
+#include <boost/asio/wait_traits.hpp>
+
+namespace boost {
+namespace asio {
+
+template<>
+struct wait_traits<ndn::time::steady_clock>
+{
+  static ndn::time::steady_clock::duration
+  to_wait_duration(const ndn::time::steady_clock::duration& d)
+  {
+    return ndn::time::steady_clock::to_wait_duration(d);
+  }
+};
+
+} // namespace asio
+} // namespace boost
+
+namespace ndn {
+namespace util {
+namespace detail {
+
+class SteadyTimer : public boost::asio::basic_waitable_timer<time::steady_clock>
+{
+public:
+  using boost::asio::basic_waitable_timer<time::steady_clock>::basic_waitable_timer;
+};
+
+} // namespace detail
+} // namespace util
+} // namespace ndn
+
+#endif // NDN_UTIL_DETAIL_STEADY_TIMER_HPP
