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

Function millis

src/wiring.cpp.hpp:46–58  ·  view source on GitHub ↗

there are 1024 microseconds per overflow counter tick.

Source from the content-addressed store, hash-verified

44
45// there are 1024 microseconds per overflow counter tick.
46unsigned long millis()
47{
48 unsigned long m;
49 fl::u8 oldSREG = SREG;
50
51 // disable interrupts while we read FastLED_timer0_millis or we might get an
52 // inconsistent value (e.g. in the middle of a write to FastLED_timer0_millis)
53 cli();
54 m = FastLED_timer0_overflow_count; //._long;
55 SREG = oldSREG;
56
57 return (m*(MICROSECONDS_PER_TIMER0_OVERFLOW/8))/(1000/8);
58}
59
60unsigned long micros() {
61 unsigned long m;

Callers 15

delayMethod · 0.70
countFPSMethod · 0.70
FL_TEST_FILEFunction · 0.50
FL_TEST_FILEFunction · 0.50
FL_TEST_FILEFunction · 0.50
FL_TEST_FILEFunction · 0.50
loopFunction · 0.50
autoResetFunction · 0.50
setupFunction · 0.50
loopFunction · 0.50
setupFunction · 0.50

Calls 1

cliFunction · 0.50

Tested by 3

loopFunction · 0.40