core: global io_service and scheduler
Scheduler and time are imported from ndn-cpp-dev.
Forwarder is using the new scheduler API.
Face system is not transitioned yet.
refs #1290
Change-Id: I5679cb50bbf9890a105f663b038f13951403c2b6
diff --git a/daemon/table/measurements.cpp b/daemon/table/measurements.cpp
index 705d3f1..ed01018 100644
--- a/daemon/table/measurements.cpp
+++ b/daemon/table/measurements.cpp
@@ -13,8 +13,7 @@
const time::Duration Measurements::s_defaultLifetime = time::seconds(4);
-Measurements::Measurements(boost::asio::io_service& ioService)
- : m_scheduler(ioService)
+Measurements::Measurements()
{
}
@@ -92,9 +91,9 @@
return;
}
- m_scheduler.cancelEvent(entry->m_cleanup);
+ scheduler::cancel(entry->m_cleanup);
entry->m_expiry = expiry;
- entry->m_cleanup = m_scheduler.scheduleEvent(lifetime,
+ entry->m_cleanup = scheduler::schedule(lifetime,
bind(&Measurements::cleanup, this, it));
}
diff --git a/daemon/table/measurements.hpp b/daemon/table/measurements.hpp
index 0fa24e0..4c6d946 100644
--- a/daemon/table/measurements.hpp
+++ b/daemon/table/measurements.hpp
@@ -20,8 +20,7 @@
class Measurements : noncopyable
{
public:
- explicit
- Measurements(boost::asio::io_service& ioService);
+ Measurements();
~Measurements();
@@ -71,7 +70,6 @@
private:
std::map<Name, shared_ptr<measurements::Entry> > m_table;
- Scheduler m_scheduler;
static const time::Duration s_defaultLifetime;
};