FastLED 3.9.15
Loading...
Searching...
No Matches

◆ delay_impl()

void fl::detail::delay_impl ( u32 ms,
bool run_async = true )

Internal delay implementation used by the public fl::delay wrapper.

Parameters
msMilliseconds to delay
run_asyncIf true, pump async tasks during delay (only on platforms with SKETCH_HAS_LARGE_MEMORY==1)

Definition at line 177 of file delay.cpp.hpp.

177 {
178#if SKETCH_HAS_LARGE_MEMORY
179 // Check if delay override is active (for fast testing with stub platform)
180 // When override is active, skip async pumping and use platform delay directly
181#if defined(FASTLED_STUB_IMPL) && (!defined(ARDUINO) || defined(FASTLED_USE_STUB_ARDUINO))
182 if (isDelayOverrideActive()) {
183 fl::platforms::delay(ms); // Use platform override directly
184 return;
185 }
186#endif
187
188 if (run_async && ms > 0) {
189 task::run(ms * 1000);
190 } else {
191 fl::platforms::delay(ms); // Use platform layer for raw delay
192 }
193#else
194 (void)run_async; // Suppress unused parameter warning
195 fl::platforms::delay(ms); // Use platform layer for raw delay
196#endif
197}
void run(fl::u32 microseconds, ExecFlags flags)
Run selected task subsystems.

References FL_NOEXCEPT, and fl::task::run().

Referenced by fl::delay(), fl::delayMillis(), and fl::delayMs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: