Skip to content

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

Open
jacobrosenthal wants to merge 2 commits into
Pinoccio:masterfrom
jacobrosenthal:replacetimer
Open

swap timer0 for symbol counter for millis and micros calculation#23
jacobrosenthal wants to merge 2 commits into
Pinoccio:masterfrom
jacobrosenthal:replacetimer

Conversation

@jacobrosenthal

Copy link
Copy Markdown

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

@soldair

soldair commented May 16, 2015

Copy link
Copy Markdown
Collaborator

awesome

@soldair

soldair commented May 16, 2015

Copy link
Copy Markdown
Collaborator

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

@matthijskooijman

Copy link
Copy Markdown
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