23 virtual bool schedule(uint32_t) {
return true; }
39 for (
auto &entry: list) {
53 for (
auto &c: reg.list) {
54 if (q.
full())
return false;
55 if (c->schedule(time)) q.
push(c);
simple Buffer backed queue implementation
Definition queue.h:12
T pop() override
remove front of queue and return it
Definition queue.h:65
bool empty() override
check if queue is empty
Definition queue.h:83
bool full() override
return true if queue is full
Definition queue.h:87
void push(T &&val) override
move element into queue
Definition queue.h:49
namespace wrapping all functionality to do with scheduling
Definition evented.h:7
dynamically allocated, but fixed-size buffer template
Definition buffer.h:18
a registry of Schedulable which can be given to the Scheduler for actual scheduling of calls
Definition schedule.h:36
represents an object that can be scheduled for later calling
Definition schedule.h:20
virtual void call()=0
this method is called to run the Schedulable
virtual bool schedule(uint32_t)
return true if object should be scheduled at this time
Definition schedule.h:23
round robin, because we're not smart enough for anything else
Definition schedule.h:47
bool schedule(uint32_t time, Schedule::Registry ®)
schedule all registered schedulables of registry if necessary
Definition schedule.h:52
void run()
run scheduled calls
Definition schedule.h:60