Job scheduler.
More...
#include <scheduler.h>
Job scheduler.
Maintains the timings upon which to execute a job.
Definition at line 37 of file scheduler.h.
◆ add() [1/2]
void dht::Scheduler::add |
( |
const Sp< Scheduler::Job > & |
job, |
|
|
time_point |
t |
|
) |
| |
|
inline |
◆ add() [2/2]
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.
◆ 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 71 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 87 of file scheduler.h.
◆ syncTime()
time_point dht::Scheduler::syncTime |
( |
| ) |
|
|
inline |
◆ time()
const time_point & dht::Scheduler::time |
( |
| ) |
const |
|
inline |
Accessors for the common time reference used for synchronizing operations.
Definition at line 116 of file scheduler.h.
The documentation for this class was generated from the following file:
- /tmp/slackbuilds_libs/opendht-1.7.4/include/opendht/scheduler.h