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

◆ pollNeededWaitSliceMs()

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

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

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

References FL_NOEXCEPT, and fl::millis().

Referenced by waitForCondition().

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