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

swap timer0 for symbol counter for millis and micros calculation #23

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jacobrosenthal
Copy link

This allows us to keep proper millis and micros even while asleep! Thus also allows systimers to keep proper time while asleep

@soldair
Copy link
Collaborator

soldair commented May 16, 2015

awesome

@soldair
Copy link
Collaborator

soldair commented May 16, 2015

@matthijskooijman do you think he needs all of these avr/* files?

@matthijskooijman
Copy link
Collaborator

Hm, I'm not too thrilled about this change. I like the end result, but to achieve it, a full copy of the Arduino core is made, to allow changing the millis() function. If we really want to achieve this, I'd prefer looking more closely at the Arduino core and see if we can contribute a change to Arduino upstream to allow making such a change from a variant (though that will take a lot more time to get accepted in Arduino, of course...).

Also, I'm not so sure if making millis() count during sleep is the best approach - it doesn't work like that on other boards, so this could cause portability problems for sketches and libraries (though I think there is not much code out there that takes sleeping into account at all).

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.

3 participants