3#ifndef __INC_FASTLED_DELAY_H
4#define __INC_FASTLED_DELAY_H
6#include "platforms/cycle_type.h"
9#include "platforms/cpu_frequency.h"
23#if (!defined(NO_MINIMUM_WAIT) || (NO_MINIMUM_WAIT==0))
91#define F_CPU_MHZ (FL_CPU_FREQUENCY() / 1000000L)
96#define NS(_NS) (((_NS * F_CPU_MHZ) + 999) / 1000)
98#define CLKS_TO_MICROS(_CLKS) ((long)(_CLKS)) / (FL_CPU_FREQUENCY() / 1000000L)
101#define NO_TIME(A, B, C) (NS(A) < 3 || NS(B) < 3 || NS(C) < 6)
fl::u16 mLastMicros
Timestamp of the last time this was run, in microseconds.
void mark() FL_NO_EXCEPT
Reset the timestamp that marks the start of the wait period.
void wait() FL_NO_EXCEPT
Blocking delay until WAIT time since mark() has passed.
CMinWait() FL_NO_EXCEPT
Constructor.
Class to ensure that a minimum amount of time has kicked since the last time run - and delay if not e...
Delay utilities for FastLED Includes nanosecond-precision delays, cycle counting, and microsecond del...
fl::u32 micros() FL_NO_EXCEPT
Universal microsecond timer - returns microseconds since system startup.