MCPcopy Create free account
hub / github.com/FastLED/FastLED / durationMicros

Method durationMicros

src/fl/video/video_impl.cpp.hpp:76–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76i32 VideoImpl::durationMicros() const {
77 if (!mStream) {
78 return -1;
79 }
80 i32 frames = mStream->framesRemaining();
81 if (frames < 0) {
82 return -1; // Stream case, duration unknown
83 }
84 fl::u32 micros_per_frame =
85 mFrameInterpolator->getFrameTracker().microsecondsPerFrame();
86 return (frames * micros_per_frame); // Convert to milliseconds
87}
88
89bool VideoImpl::draw(fl::u32 now, fl::span<CRGB> leds) {
90 if (!mTime) {

Callers

nothing calls this directly

Calls 2

framesRemainingMethod · 0.80
microsecondsPerFrameMethod · 0.80

Tested by

no test coverage detected