FastLED 3.10.10
Loading...
Searching...
No Matches

◆ pollNeededWaitSliceMs()

u32 fl::ChannelManager::pollNeededWaitSliceMs ( u32 startTime,
u32 timeoutMs ) const
private

Definition at line 83 of file manager.cpp.hpp.

83 {
84 constexpr u32 kPollNeededFallbackSliceMs = 1;
85 if (timeoutMs == 0) {
86 return kPollNeededFallbackSliceMs;
87 }
88 const u32 elapsed = millis() - startTime;
89 if (elapsed >= timeoutMs) {
90 return 0;
91 }
92 const u32 remaining = timeoutMs - elapsed;
93 return remaining < kPollNeededFallbackSliceMs ? remaining : kPollNeededFallbackSliceMs;
94}
fl::u32 millis() FL_NO_EXCEPT
Universal millisecond timer - returns milliseconds since system startup.

References fl::FL_NO_EXCEPT, and fl::millis().

Referenced by waitForState().

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