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

◆ delay()

void CFastLED::delay ( unsigned long ms)

Delay for the given number of milliseconds.

Provided to allow the library to be used on platforms that don't have a delay function (to allow code to be more portable).

Note
This will call show() constantly to drive the dithering engine (and will call show() at least once).
Parameters
msthe number of milliseconds to pause for

Definition at line 377 of file FastLED.cpp.hpp.

377 {
378 unsigned long start = fl::millis();
379 do {
380#ifndef FASTLED_ACCURATE_CLOCK
381 // make sure to allow at least one ms to pass to ensure the clock moves
382 // forward
383 fl::delay(1);
384#endif
385 show();
386 fl::yield();
387 }
388 while((fl::millis()-start) < ms);
389}
void show()
Update all our controllers with the current led colors.
Definition FastLED.h:1649
fl::u32 millis()
Universal millisecond timer - returns milliseconds since system startup.
void delay(u32 ms, bool run_async=true) FL_NOEXCEPT
Public delay wrapper that keeps bare Arduino delay() preferred after using fl::delay; while still all...
Definition delay.h:98
void yield()
Yield to the platform scheduler.
Definition yield.cpp.hpp:31

References fl::delay(), fl::millis(), show(), and fl::yield().

+ Here is the call graph for this function: