Generic scheduler. More...
#include <scheduler.hpp>
Public Types | |
typedef EventCallback | Event |
Public Member Functions | |
Scheduler (boost::asio::io_service &ioService) | |
~Scheduler () | |
EventId | scheduleEvent (const time::nanoseconds &after, const Event &event) |
Schedule a one-time event after the specified delay. More... | |
void | cancelEvent (const EventId &eventId) |
Cancel a scheduled event. More... | |
void | cancelAllEvents () |
Cancel all scheduled events. More... | |
Generic scheduler.
Definition at line 56 of file scheduler.hpp.
Definition at line 62 of file scheduler.hpp.
|
explicit |
Definition at line 49 of file scheduler.cpp.
ndn::util::scheduler::Scheduler::~Scheduler | ( | ) |
Definition at line 54 of file scheduler.cpp.
References cancelAllEvents().
EventId ndn::util::scheduler::Scheduler::scheduleEvent | ( | const time::nanoseconds & | after, |
const Event & | event | ||
) |
Schedule a one-time event after the specified delay.
Definition at line 60 of file scheduler.cpp.
Referenced by ndn::dns::Resolver::asyncResolve().
void ndn::util::scheduler::Scheduler::cancelEvent | ( | const EventId & | eventId | ) |
Cancel a scheduled event.
Definition at line 81 of file scheduler.cpp.
Referenced by ndn::util::scheduler::ScopedEventId::cancel(), ndn::util::scheduler::ScopedEventId::operator=(), and ndn::util::scheduler::ScopedEventId::~ScopedEventId().
void ndn::util::scheduler::Scheduler::cancelAllEvents | ( | ) |
Cancel all scheduled events.
Definition at line 91 of file scheduler.cpp.
Referenced by ~Scheduler().