db2db
November 13, 2014, 12:26am
1
If I have a board that runs from months with no intervention, will millis() be an issue if it's testing for button presses?
It seems like once it reaches the top value in a 'unsigned long' variable (4 billion?), there might be an issue.
Is this an issue? Is there something in software I need to do when waiting for a switch closure for months at a time?
db2db
November 14, 2014, 4:25am
3
Much appreciated!
I might change all my code to micros() so I don't have to wait 48 days to feel comfortable
db2db
November 14, 2014, 4:37am
4
I suppose it actually makes sense to change millis() to micros(), for testing. Then if there is a rollover issue it will show up in 70 minutes, instead of 48 days.
Make sense?
LarryD
November 14, 2014, 4:44am
5
You can also just do some math with unsigned long numbers.