core+daemon: eliminate scheduler::{schedule,cancel} wrappers
Also move core/global-io.hpp to daemon/global.hpp
Refs: #4528, #4883
Change-Id: I0b99029f1a19d7451aab57099cd3303b7eb42ff3
diff --git a/daemon/rib/readvertise/readvertise.cpp b/daemon/rib/readvertise/readvertise.cpp
index 454ab20..49c3400 100644
--- a/daemon/rib/readvertise/readvertise.cpp
+++ b/daemon/rib/readvertise/readvertise.cpp
@@ -44,7 +44,7 @@
return std::max(newTime, 0_ms);
}
-Readvertise::Readvertise(Rib& rib, ndn::util::Scheduler& scheduler,
+Readvertise::Readvertise(Rib& rib, Scheduler& scheduler,
unique_ptr<ReadvertisePolicy> policy,
unique_ptr<ReadvertiseDestination> destination)
: m_scheduler(scheduler)
@@ -162,14 +162,14 @@
[=] {
NFD_LOG_DEBUG("advertise " << rrIt->prefix << " success");
rrIt->retryDelay = RETRY_DELAY_MIN;
- rrIt->retryEvt = m_scheduler.scheduleEvent(randomizeTimer(m_policy->getRefreshInterval()),
- [=] { advertise(rrIt); });
+ rrIt->retryEvt = m_scheduler.schedule(randomizeTimer(m_policy->getRefreshInterval()),
+ [=] { advertise(rrIt); });
},
[=] (const std::string& msg) {
NFD_LOG_DEBUG("advertise " << rrIt->prefix << " failure " << msg);
rrIt->retryDelay = std::min(RETRY_DELAY_MAX, rrIt->retryDelay * 2);
- rrIt->retryEvt = m_scheduler.scheduleEvent(randomizeTimer(rrIt->retryDelay),
- [=] { advertise(rrIt); });
+ rrIt->retryEvt = m_scheduler.schedule(randomizeTimer(rrIt->retryDelay),
+ [=] { advertise(rrIt); });
});
}
@@ -192,8 +192,8 @@
[=] (const std::string& msg) {
NFD_LOG_DEBUG("withdraw " << rrIt->prefix << " failure " << msg);
rrIt->retryDelay = std::min(RETRY_DELAY_MAX, rrIt->retryDelay * 2);
- rrIt->retryEvt = m_scheduler.scheduleEvent(randomizeTimer(rrIt->retryDelay),
- [=] { withdraw(rrIt); });
+ rrIt->retryEvt = m_scheduler.schedule(randomizeTimer(rrIt->retryDelay),
+ [=] { withdraw(rrIt); });
});
}