-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add current_time
#1503
Add current_time
#1503
Conversation
I've tried this out locally and all is working fine! Could we add a small basic test case to assert that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking care of this!
Thank you for your contribution!
We appreciate the time and effort you've put into this pull request.
To help us review it efficiently, please ensure you've gone through the following checklist:
Submission Checklist 📝
CHANGELOG.md
in the proper section.Extra:
Pull Request Details 📖
Description
Closes #1139
This adds
time::current_time
to get the system uptime.On ESP32 it uses the (mostly undocumented) LAC timer - same as esp-idf.
On all other chips it uses Systimer.
Testing
The
timer_interrupt
example is changed to use the API.I also changed esp-wifi to use it and everything worked fine. (It might also improve performance on Xtensa targets but I didn't benchmark it)