FastLED 3.10.9
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 527 of file FastLED.cpp.hpp.

527 {
528 unsigned long start = fl::millis();
529 do {
530#ifndef FASTLED_ACCURATE_CLOCK
531 // make sure to allow at least one ms to pass to ensure the clock moves
532 // forward
533 fl::delay(1);
534#endif
535 show();
536 fl::yield();
537 }
538 while((fl::millis()-start) < ms);
539}
void show() FL_NO_EXCEPT
Update all our controllers with the current led colors.
Definition FastLED.h:1906
void delay(u32 ms, bool run_async=true) FL_NO_EXCEPT
Public delay wrapper that keeps bare Arduino delay() preferred after using fl::delay; while still all...
Definition delay.h:98
fl::u32 millis() FL_NO_EXCEPT
Universal millisecond timer - returns milliseconds since system startup.
void yield() FL_NO_EXCEPT
Yield to the platform scheduler.
Definition yield.cpp.hpp:32

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

+ Here is the call graph for this function: