FastLED 3.10.6
Loading...
Searching...
No Matches

◆ pollNeededWaitSliceMs()

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

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

76 {
77 constexpr u32 kPollNeededFallbackSliceMs = 1;
78 if (timeoutMs == 0) {
79 return kPollNeededFallbackSliceMs;
80 }
81 const u32 elapsed = millis() - startTime;
82 if (elapsed >= timeoutMs) {
83 return 0;
84 }
85 const u32 remaining = timeoutMs - elapsed;
86 return remaining < kPollNeededFallbackSliceMs ? remaining : kPollNeededFallbackSliceMs;
87}
fl::u32 millis()
Universal millisecond timer - returns milliseconds since system startup.

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

Referenced by waitForCondition().

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