3#ifndef __INC_FASTLED_DELAY_H
4#define __INC_FASTLED_DELAY_H
6#include "platforms/cycle_type.h"
9#include "platforms/cpu_frequency.h"
22#if (!defined(NO_MINIMUM_WAIT) || (NO_MINIMUM_WAIT==0))
90#define F_CPU_MHZ (GET_CPU_FREQUENCY() / 1000000L)
95#define NS(_NS) (((_NS * F_CPU_MHZ) + 999) / 1000)
97#define CLKS_TO_MICROS(_CLKS) ((long)(_CLKS)) / (GET_CPU_FREQUENCY() / 1000000L)
100#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()
Reset the timestamp that marks the start of the wait period.
void wait()
Blocking delay until WAIT time since mark() has passed.
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()
Universal microsecond timer - returns microseconds since system startup.