ndn::util::scheduler::Scheduler Class Reference

Generic scheduler. More...

#include <scheduler.hpp>

+ Inheritance diagram for ndn::util::scheduler::Scheduler:
+ Collaboration diagram for ndn::util::scheduler::Scheduler:

Public Member Functions

 Scheduler (boost::asio::io_service &ioService)
 
 ~Scheduler ()
 
void cancelAllEvents ()
 Cancel all scheduled events. More...
 
void cancelEvent (const EventId &eventId)
 Cancel a scheduled event. More...
 
EventId scheduleEvent (time::nanoseconds after, const EventCallback &callback)
 Schedule a one-time event after the specified delay. More...
 

Detailed Description

Generic scheduler.

Definition at line 122 of file scheduler.hpp.

Constructor & Destructor Documentation

ndn::util::scheduler::Scheduler::Scheduler ( boost::asio::io_service &  ioService)
explicit

Definition at line 78 of file scheduler.cpp.

ndn::util::scheduler::Scheduler::~Scheduler ( )
default

Member Function Documentation

void ndn::util::scheduler::Scheduler::cancelAllEvents ( )

Cancel all scheduled events.

Definition at line 121 of file scheduler.cpp.

void ndn::util::scheduler::Scheduler::cancelEvent ( const EventId eventId)

Cancel a scheduled event.

Definition at line 103 of file scheduler.cpp.

EventId ndn::util::scheduler::Scheduler::scheduleEvent ( time::nanoseconds  after,
const EventCallback callback 
)

Schedule a one-time event after the specified delay.

Returns
EventId that can be used to cancel the scheduled event

Definition at line 87 of file scheduler.cpp.