-
Notifications
You must be signed in to change notification settings - Fork 19
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Feature Request: provide a millis function #24
Comments
I have studied the code base a bit and I am fairly confident that this is feasible. I would like to share my thoughts on how this could be implemented, getting some feedback if it could work and how it can be improved. As for the API, I would suggest extending the uint32_t millis(void); The implementation in If this sound good, I am willing to provide a pull request implementing this feature. |
Ok, just pushed the feature. In the Board Manager you should have the option to update the Jewelbots Arduino Library to v1.0.1 which contains the function (runtime_ms). Ended up being simple, but took a bit of research to reassure myself it would work together with everything else. A quick note that tripped me up, since the original definition is runtime since the program began that is what I implemented in the code. The timer starts as early in the bootup sequence as possible and I immediately grab a time value at that point to use as the starting point. But after it grabs that value the vibration motor calibrates and the led startup sequence goes, so the value of runtime when the code inside your setup or loop functions start may be later than would be expected. Thanks again for your interest in Jewelbots! Please let me know if this works for you and maybe you could share a bit about what you are building on our forums (community.jewelbots.com). |
I was working on a project fully expecting to be able to call
millis
, a function thatUnfortunately the code does not compile because
It would be great if the
millis
function would be provided as a function.The text was updated successfully, but these errors were encountered: