marcmerlin
Well-known member
I have code like this
before = millis()
leds.show() (using adafruit neopixel or FastLED libraries)
Serial.println(millis() - before)
Because both libraries when they talk to neopixels, have to disable interrupts for some amount of time, millis() does not increment, and therefore I get the wrong value back.
Using micros() is supposed to use CPU counters, but does not work better in my testing.
Is there another way to get time elapsed in that case? (if possible in a way that works on other processors too)
Thanks.
before = millis()
leds.show() (using adafruit neopixel or FastLED libraries)
Serial.println(millis() - before)
Because both libraries when they talk to neopixels, have to disable interrupts for some amount of time, millis() does not increment, and therefore I get the wrong value back.
Using micros() is supposed to use CPU counters, but does not work better in my testing.
Is there another way to get time elapsed in that case? (if possible in a way that works on other processors too)
Thanks.