diff --git a/core/global-io.cpp b/core/global-io.cpp
deleted file mode 100644
index 48566f6..0000000
--- a/core/global-io.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2015,  Regents of the University of California,
- *                           Arizona Board of Regents,
- *                           Colorado State University,
- *                           University Pierre & Marie Curie, Sorbonne University,
- *                           Washington University in St. Louis,
- *                           Beijing Institute of Technology,
- *                           The University of Memphis.
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * NFD 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "global-io.hpp"
-#include <boost/thread/tss.hpp>
-
-namespace nfd {
-
-namespace scheduler {
-// defined in scheduler.cpp
-void
-resetGlobalScheduler();
-} // namespace scheduler
-
-
-static boost::thread_specific_ptr<boost::asio::io_service> g_ioService;
-
-boost::asio::io_service&
-getGlobalIoService()
-{
-  if (g_ioService.get() == nullptr) {
-    g_ioService.reset(new boost::asio::io_service());
-  }
-  return *g_ioService;
-}
-
-void
-resetGlobalIoService()
-{
-  scheduler::resetGlobalScheduler();
-  g_ioService.reset();
-}
-
-} // namespace nfd
diff --git a/core/global-io.hpp b/core/global-io.hpp
index d5030ab..ef90b18 100644
--- a/core/global-io.hpp
+++ b/core/global-io.hpp
@@ -29,18 +29,24 @@
 
 namespace nfd {
 
-/** \return the global io_service instance
+/** \return *nullptr (kept for interface compatibility)
  */
-boost::asio::io_service&
-getGlobalIoService();
+inline boost::asio::io_service&
+getGlobalIoService()
+{
+  return *static_cast<boost::asio::io_service*>(nullptr);
+}
 
 #ifdef WITH_TESTS
 /** \brief delete the global io_service instance
  *
  *  It will be recreated at the next invocation of getGlobalIoService.
  */
-void
-resetGlobalIoService();
+inline void
+resetGlobalIoService()
+{
+  // noop
+}
 #endif
 
 } // namespace nfd
diff --git a/core/scheduler.cpp b/core/scheduler.cpp
index 177045f..504a53c 100644
--- a/core/scheduler.cpp
+++ b/core/scheduler.cpp
@@ -24,41 +24,43 @@
  */
 
 #include "scheduler.hpp"
-#include "global-io.hpp"
 
-#include <boost/thread/tss.hpp>
+namespace ns3 {
+
+/// @cond include_hidden
+
+template<>
+struct EventMemberImplObjTraits<std::function<void()>> {
+  typedef std::function<void()> T;
+  static T&
+  GetReference(T& p)
+  {
+    return p;
+  }
+};
+
+/// @endcond
+
+} // namespace ns3
 
 namespace nfd {
 namespace scheduler {
 
-static boost::thread_specific_ptr<Scheduler> g_scheduler;
-
-Scheduler&
-getGlobalScheduler()
-{
-  if (g_scheduler.get() == nullptr) {
-    g_scheduler.reset(new Scheduler(getGlobalIoService()));
-  }
-
-  return *g_scheduler;
-}
-
 EventId
-schedule(const time::nanoseconds& after, const Scheduler::Event& event)
+schedule(const time::nanoseconds& after, const std::function<void()>& event)
 {
-  return getGlobalScheduler().scheduleEvent(after, event);
+  ns3::EventId id = ns3::Simulator::Schedule(ns3::NanoSeconds(after.count()),
+                                             &std::function<void()>::operator(), event);
+  return std::make_shared<ns3::EventId>(id);
 }
 
 void
 cancel(const EventId& eventId)
 {
-  getGlobalScheduler().cancelEvent(eventId);
-}
-
-void
-resetGlobalScheduler()
-{
-  g_scheduler.reset();
+  if (eventId != nullptr) {
+    ns3::Simulator::Remove(*eventId);
+    const_cast<EventId&>(eventId).reset();
+  }
 }
 
 ScopedEventId::ScopedEventId()
diff --git a/core/scheduler.hpp b/core/scheduler.hpp
index b846c64..8c9db68 100644
--- a/core/scheduler.hpp
+++ b/core/scheduler.hpp
@@ -27,22 +27,21 @@
 #define NFD_CORE_SCHEDULER_HPP
 
 #include "common.hpp"
-#include <ndn-cxx/util/scheduler.hpp>
+
+#include "ns3/simulator.h"
 
 namespace nfd {
 namespace scheduler {
 
-using ndn::Scheduler;
-
 /** \class EventId
  *  \brief Opaque type (shared_ptr) representing ID of a scheduled event
  */
-using ndn::EventId;
+typedef std::shared_ptr<ns3::EventId> EventId;
 
 /** \brief schedule an event
  */
 EventId
-schedule(const time::nanoseconds& after, const Scheduler::Event& event);
+schedule(const time::nanoseconds& after, const std::function<void()>& event);
 
 /** \brief cancel a scheduled event
  */
diff --git a/daemon/mgmt/internal-face.cpp b/daemon/mgmt/internal-face.cpp
index 7569fb9..482ed39 100644
--- a/daemon/mgmt/internal-face.cpp
+++ b/daemon/mgmt/internal-face.cpp
@@ -25,7 +25,7 @@
 
 #include "internal-face.hpp"
 #include "core/logger.hpp"
-#include "core/global-io.hpp"
+#include "core/scheduler.hpp"
 
 namespace nfd {
 
@@ -43,8 +43,8 @@
 
   // Invoke .processInterest a bit later,
   // to avoid potential problems in forwarding pipelines.
-  getGlobalIoService().post(bind(&InternalFace::processInterest,
-                                 this, interest.shared_from_this()));
+  scheduler::schedule(time::seconds(0),
+                      bind(&InternalFace::processInterest, this, interest.shared_from_this()));
 }
 
 void
