Generic scheduler. More...
#include <scheduler.hpp>
Public Types | |
typedef function< void()> | Event |
Public Member Functions | |
Scheduler (boost::asio::io_service &ioService) | |
EventId | scheduleEvent (const time::nanoseconds &after, const Event &event) |
Schedule one time event after the specified delay. More... | |
void | cancelEvent (const EventId &eventId) |
Cancel scheduled event. More... | |
void | cancelAllEvents () |
Cancel all scheduled events. More... | |
Friends | |
struct | EventIdImpl |
Generic scheduler.
Definition at line 46 of file scheduler.hpp.
typedef function<void()> ndn::util::scheduler::Scheduler::Event |
Definition at line 49 of file scheduler.hpp.
ndn::util::scheduler::Scheduler::Scheduler | ( | boost::asio::io_service & | ioService | ) |
Definition at line 111 of file scheduler.cpp.
EventId ndn::util::scheduler::Scheduler::scheduleEvent | ( | const time::nanoseconds & | after, |
const Event & | event | ||
) |
Schedule one time event after the specified delay.
Definition at line 117 of file scheduler.cpp.
void ndn::util::scheduler::Scheduler::cancelEvent | ( | const EventId & | eventId | ) |
Cancel scheduled event.
Definition at line 128 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 138 of file scheduler.cpp.
|
friend |
Definition at line 100 of file scheduler.hpp.