22template<
typename Task = fl::function<
void()>>
48 size_t tick(u32 currentTime) {
51 while (!
mQueue.empty() && currentTime >=
mQueue.top().executeAt) {
fl::priority_queue_stable< ScheduledTask > mQueue
void schedule(u32 timestamp, Task task)
Schedule a task for execution at specified timestamp.
RpcScheduler() FL_NOEXCEPT=default
size_t tick(u32 currentTime)
Execute all tasks with timestamp <= currentTime.
void clear()
Clear all scheduled tasks.
size_t pendingCount() const
Get number of pending scheduled tasks.
Stable priority queue that maintains FIFO ordering for equal-priority elements.
constexpr remove_reference< T >::type && move(T &&t) FL_NOEXCEPT
Base definition for an LED controller.
bool operator<(const ScheduledTask &other) const