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

◆ micros64()

fl::u64 fl::micros64 ( )

64-bit monotonic microsecond timer.

Extends the platform's 32-bit microsecond counter using unsigned elapsed deltas, so the returned value never wraps in practical use.

Definition at line 126 of file chrono.cpp.hpp.

126 {
127 Micros64State& state = get_micros64_state();
128 fl::unique_lock<fl::mutex> lock(state.mutex);
129 const fl::u32 current = fl::micros();
130 if (!state.initialized) {
131 state.accumulated = current;
132 state.last_micros = current;
133 state.initialized = true;
134 return state.accumulated;
135 }
136 state.accumulated += static_cast<fl::u32>(current - state.last_micros);
137 state.last_micros = current;
138 return state.accumulated;
139}
TestState state
fl::u32 micros()
Universal microsecond timer - returns microseconds since system startup.

References FL_NO_EXCEPT, micros(), micros64(), and state.

Referenced by micros64(), fl::chrono::steady_clock::now(), and fl::chrono::system_clock::now().

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