MCPcopy Create free account
hub / github.com/FastLED/FastLED / tick

Method tick

src/fl/net/rpc_scheduler.h:48–60  ·  view source on GitHub ↗

* @brief Execute all tasks with timestamp <= currentTime * @param currentTime Current time (e.g., millis()) * @return Number of tasks executed */

Source from the content-addressed store, hash-verified

46 * @return Number of tasks executed
47 */
48 size_t tick(u32 currentTime) {
49 size_t executed = 0;
50
51 while (!mQueue.empty() && currentTime >= mQueue.top().executeAt) {
52 // Copy the task before popping (can't execute after pop)
53 ScheduledTask scheduledTask = mQueue.top();
54 mQueue.pop();
55 scheduledTask.task(); // Execute task
56 executed++;
57 }
58
59 return executed;
60 }
61
62 /**
63 * @brief Get number of pending scheduled tasks

Callers

nothing calls this directly

Calls 2

emptyMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected