FastLED 3.10.8
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 523 of file FastLED.cpp.hpp.

523 {
524 unsigned long start = fl::millis();
525 do {
526#ifndef FASTLED_ACCURATE_CLOCK
527 // make sure to allow at least one ms to pass to ensure the clock moves
528 // forward
529 fl::delay(1);
530#endif
531 show();
532 fl::yield();
533 }
534 while((fl::millis()-start) < ms);
535}
void show() FL_NO_EXCEPT
Update all our controllers with the current led colors.
Definition FastLED.h:1894
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: