FastLED 3.10.6
Loading...
Searching...
No Matches

◆ ready_to_run()

bool fl::task::TimeTask::ready_to_run ( u32 current_time) const
inlineoverridevirtual

Implements fl::task::ITaskImpl.

Definition at line 158 of file task.cpp.hpp.

158 {
160 return false; // Frame tasks not ready during regular updates
161 }
162 if (mIntervalMs <= 0) return true;
163 // Use (max)() to prevent macro expansion by Arduino.h's max macro
164 if (mLastRunTime == (fl::numeric_limits<u32>::max)()) return true;
165 return (current_time - mLastRunTime) >= static_cast<u32>(mIntervalMs);
166 }
@ kBeforeFrame
Runs immediately before each FastLED frame is rendered.
Definition task.h:120
@ kAfterFrame
Runs immediately after each FastLED frame is rendered.
Definition task.h:121
static constexpr T max() FL_NO_EXCEPT
Definition limits.h:108

References fl::task::kAfterFrame, fl::task::kBeforeFrame, fl::numeric_limits< T >::max(), mIntervalMs, mLastRunTime, and mType.

+ Here is the call graph for this function: