Skip to content

Conversation

@Jeroen88
Copy link
Contributor

@Jeroen88 Jeroen88 commented Feb 8, 2019

Corrects issue #2430, thanks to @stickbreaker for the very easy solution found!

This solution is very different from the ESP8266 solution, because on that controller the micros() timer used to calculate millis() is a 32 bit wide counter. On the ESP32 the micros() base counter is 64 bits wide, allowing the solution to be both fast and simple. As I understand from reading topics on the internet, the division by 1,000 needed in this solution should be optimised by the gcc compiler using the same magic number method as in the ESP8266.

The new millis() function was tested (only) one loop of 72 minutes, without an issue.

@me-no-dev me-no-dev merged commit 71ec3c3 into espressif:master Feb 14, 2019
everslick added a commit to everslick/Arduino-ESP32-1.0.0 that referenced this pull request Feb 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants