roo_scheduler

Allows scheduling delayed and/or repetitive tasks.

Author
Dejwk
Website
https://github.com/dejwk/roo_scheduler
Category
Timing
License
MIT
Library Type
Contributed
Architectures
Any

Works on boards that support C++ standard library (e.g. Espressif ESP32 family). Specifically, it requires the following standard headers: `<memory>`, `<queue>`, and `<functional>`. Uses `std::priority_queue` for storage, and therefore: (1) Maintains the queue in a flat vector, and thus, does not dynamically reallocate memory as long as the queue remains below its present capacity. (In most practical cases, the queue will stay within small bound capacity); (2) Scheduling a task, as well as looking up the nearest scheduled task, is O(log N), where N is the queue length, so it remains fast even in those rare cases when the queue gets longer. The tasks can be defined as function pointers, but also as inline lambdas, or generally as arbitrary callables, so it is convenient and idiomatic to make them stateful.

Downloads

Filename Release Date File Size
roo_scheduler-1.2.0.zip 2023-12-31 10.61 KiB
roo_scheduler-1.1.1.zip 2023-12-23 12.32 KiB
roo_scheduler-1.1.0.zip 2023-11-27 12.26 KiB