ndn::scheduler::Scheduler Class Reference

Generic time-based scheduler. More...

#include <ndn-cxx/util/scheduler.hpp>

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

Public Member Functions

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

Detailed Description

Generic time-based scheduler.

Definition at line 134 of file scheduler.hpp.

Constructor & Destructor Documentation

◆ Scheduler()

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

Definition at line 84 of file scheduler.cpp.

◆ ~Scheduler()

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

Member Function Documentation

◆ cancelAllEvents()

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

Cancel all scheduled events.

Definition at line 125 of file scheduler.cpp.

◆ schedule()

EventId ndn::scheduler::Scheduler::schedule ( time::nanoseconds  after,
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 92 of file scheduler.cpp.