Job scheduler.
More...
#include <scheduler.h>
Job scheduler.
Maintains the timings upon which to execute a job.
Definition at line 36 of file scheduler.h.
◆ add()
Sp< Scheduler::Job > dht::Scheduler::add |
( |
time_point | t, |
|
|
std::function< void()> && | job_func ) |
|
inline |
Adds another job to the queue.
- Parameters
-
time | The time upon which the job shall be executed. |
job_func | The job function to execute. |
- Returns
- pointer to the newly scheduled job.
Definition at line 53 of file scheduler.h.
◆ cancel()
◆ edit()
void dht::Scheduler::edit |
( |
Sp< Scheduler::Job > & | job, |
|
|
time_point | t ) |
|
inline |
Reschedules a job.
- Parameters
-
job | The job to edit. |
t | The time at which the job shall be rescheduled. |
Definition at line 66 of file scheduler.h.
◆ getNextJobTime()
time_point dht::Scheduler::getNextJobTime |
( |
| ) |
const |
|
inline |
◆ run()
time_point dht::Scheduler::run |
( |
| ) |
|
|
inline |
Runs the jobs to do up to now.
- Returns
- The time for the next job to run.
Definition at line 95 of file scheduler.h.
◆ syncTime() [1/2]
time_point dht::Scheduler::syncTime |
( |
| ) |
|
|
inline |
◆ syncTime() [2/2]
void dht::Scheduler::syncTime |
( |
const time_point & | n | ) |
|
|
inline |
◆ time()
const time_point & dht::Scheduler::time |
( |
| ) |
const |
|
inline |
Accessors for the common time reference used for synchronizing operations.
Definition at line 123 of file scheduler.h.
The documentation for this class was generated from the following file:
- /home/iurt/rpmbuild/BUILD/opendht-3.2.0-build/opendht-3.2.0/include/opendht/scheduler.h