Skip to content
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

redefine c_time so it doesn't use millis() #36

Open
2 of 3 tasks
rickyelopez opened this issue Oct 6, 2020 · 0 comments · May be fixed by #39
Open
2 of 3 tasks

redefine c_time so it doesn't use millis() #36

rickyelopez opened this issue Oct 6, 2020 · 0 comments · May be fixed by #39
Assignees
Labels
enhancement New feature or request optimization Optimizing existing code

Comments

@rickyelopez
Copy link
Member

Even though it turns out the millis() function is actually really efficient, we can do even better! Redefine c_time as an alias to systick_uptime_millis and then we never need to update the value again.

  • redefine c_time as alias for systick_uptime_millis
  • remove all calls to millis()
  • validate that everything still works
@rickyelopez rickyelopez added enhancement New feature or request optimization Optimizing existing code labels Oct 6, 2020
@rickyelopez rickyelopez self-assigned this Oct 6, 2020
rickyelopez added a commit that referenced this issue Oct 6, 2020
c_time now reports the value of systick_uptime_millis, which means we
should _never_ need to update c_time any more! It should always contain
the most up to date value. This will probably have little to no actual
impact, but in theory it means that all our timing operations should be
much faster.
addresses #36
NOTE: this needs validation!
@rickyelopez rickyelopez linked a pull request Oct 10, 2020 that will close this issue
@rickyelopez rickyelopez linked a pull request Oct 10, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request optimization Optimizing existing code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant