Schedules deferred and recurring background tasks.
Synopsis
Declared in <scheduler.h>
class CScheduler;
Type Aliases
Name |
Description |
Callable type for scheduled tasks. |
Member Functions
Name |
Description |
|
Constructs an idle scheduler with an empty task queue. |
|
Destroys the scheduler; the service thread must already be stopped. |
Returns true if there are threads actively running in serviceQueue() |
|
Mock the scheduler to fast forward in time. Iterates through items on taskQueue and reschedules them to be delta_seconds sooner. |
|
Tell any threads running serviceQueue to stop when there is no work left to be done |
|
Returns number of tasks waiting to be serviced, and first and last task times |
|
Call func at/after time t |
|
Repeat f until the scheduler is stopped. First run is after delta has passed once. |
|
Call f once after the delta has passed |
|
scheduler Services the queue 'forever'. Should be run in a thread. |
|
Tell any threads running serviceQueue to stop as soon as the current task is done |
Data Members
Name |
Description |
Thread running serviceQueue(), if the scheduler was started on its own thread. |
Created with MrDocs