Generic scheduler. More...
#include <scheduler.hpp>
Public Member Functions | |
Scheduler (DummyIoService &ioService) | |
~Scheduler () | |
EventId | scheduleEvent (time::nanoseconds after, const EventCallback &callback) |
Schedule a one-time event after the specified delay. More... | |
void | cancelEvent (const EventId &eid) |
Cancel a scheduled event. More... | |
void | cancelAllEvents () |
Cancel all scheduled events. More... | |
Generic scheduler.
Definition at line 150 of file scheduler.hpp.
|
explicit |
Definition at line 92 of file scheduler.cpp.
ndn::util::scheduler::Scheduler::~Scheduler | ( | ) |
Definition at line 97 of file scheduler.cpp.
References cancelAllEvents().
EventId ndn::util::scheduler::Scheduler::scheduleEvent | ( | time::nanoseconds | after, |
const EventCallback & | callback | ||
) |
Schedule a one-time event after the specified delay.
Definition at line 103 of file scheduler.cpp.
Referenced by ndn::Face::Impl::Impl(), nfd::scheduler::schedule(), ndn::InMemoryStorageEntry::scheduleMarkStale(), and ndn::util::SegmentFetcher::stop().
|
inline |
Cancel a scheduled event.
You may also invoke eid.cancel()
Definition at line 169 of file scheduler.hpp.
References ndn::detail::CancelHandle::cancel().
Referenced by ndn::util::SegmentFetcher::stop().
void ndn::util::scheduler::Scheduler::cancelAllEvents | ( | ) |
Cancel all scheduled events.
Definition at line 141 of file scheduler.cpp.
Referenced by ~Scheduler().