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

Function delay_impl

src/fl/system/delay.cpp.hpp:177–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175namespace detail {
176
177void delay_impl(u32 ms, bool run_async) FL_NOEXCEPT {
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}
198
199} // namespace detail
200

Callers 3

delayMillisFunction · 0.85
delayFunction · 0.85
delayMsFunction · 0.85

Calls 3

isDelayOverrideActiveFunction · 0.85
delayFunction · 0.70
runFunction · 0.50

Tested by

no test coverage detected