diff --git a/NFD/core/global-io.cpp b/NFD/core/global-io.cpp
deleted file mode 100644
index f8d8270..0000000
--- a/NFD/core/global-io.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014  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
- *
- * 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"
-
-namespace nfd {
-
-namespace scheduler {
-// defined in scheduler.cpp
-void
-resetGlobalScheduler();
-} // namespace scheduler
-
-static shared_ptr<boost::asio::io_service> g_ioService;
-
-boost::asio::io_service&
-getGlobalIoService()
-{
-  if (!static_cast<bool>(g_ioService)) {
-    g_ioService = make_shared<boost::asio::io_service>();
-  }
-  return *g_ioService;
-}
-
-void
-resetGlobalIoService()
-{
-  scheduler::resetGlobalScheduler();
-  g_ioService.reset();
-}
-
-} // namespace nfd
diff --git a/NFD/core/global-io.hpp b/NFD/core/global-io.hpp
deleted file mode 100644
index d5030ab..0000000
--- a/NFD/core/global-io.hpp
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014  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
- *
- * 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/>.
- **/
-
-#ifndef NFD_CORE_GLOBAL_IO_HPP
-#define NFD_CORE_GLOBAL_IO_HPP
-
-#include "common.hpp"
-
-namespace nfd {
-
-/** \return the global io_service instance
- */
-boost::asio::io_service&
-getGlobalIoService();
-
-#ifdef WITH_TESTS
-/** \brief delete the global io_service instance
- *
- *  It will be recreated at the next invocation of getGlobalIoService.
- */
-void
-resetGlobalIoService();
-#endif
-
-} // namespace nfd
-
-#endif // NFD_CORE_GLOBAL_IO_HPP
diff --git a/NFD/core/scheduler.cpp b/NFD/core/scheduler.cpp
index 0979f97..ed6cffd 100644
--- a/NFD/core/scheduler.cpp
+++ b/NFD/core/scheduler.cpp
@@ -24,38 +24,39 @@
  */
 
 #include "scheduler.hpp"
-#include "global-io.hpp"
+
+namespace ns3 {
+
+template<>
+struct EventMemberImplObjTraits<std::function<void()>> {
+  typedef std::function<void()> T;
+  static T&
+  GetReference(T& p)
+  {
+    return p;
+  }
+};
+
+} // namespace ns3
 
 namespace nfd {
 namespace scheduler {
 
-static shared_ptr<Scheduler> g_scheduler;
-
-inline Scheduler&
-getGlobalScheduler()
-{
-  if (!static_cast<bool>(g_scheduler)) {
-    g_scheduler = make_shared<Scheduler>(ref(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/NFD/core/scheduler.hpp b/NFD/core/scheduler.hpp
index a4b43c1..4ef124c 100644
--- a/NFD/core/scheduler.hpp
+++ b/NFD/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
  */
