frankzappa
Well-known member
Hello!
In stead of me trying to solve this on my own doing something unnecessary and inefficient, I figured I’d ask here first because I’m sure it’s a common problem.
I’m starting a counter of elapsedMicros when an event occurs and I really only need to count up to maybe 3ms to know how long ago it happened. If it’s older than 3000 micros then the event is ignored.
This works fine but in case of the timer overflowing it will not be useful because I’m always checking if there are any events less than say 3ms ago.
Is there any standardised way to solve this?
Like maybe stop the count?
Thanks.
In stead of me trying to solve this on my own doing something unnecessary and inefficient, I figured I’d ask here first because I’m sure it’s a common problem.
I’m starting a counter of elapsedMicros when an event occurs and I really only need to count up to maybe 3ms to know how long ago it happened. If it’s older than 3000 micros then the event is ignored.
This works fine but in case of the timer overflowing it will not be useful because I’m always checking if there are any events less than say 3ms ago.
Is there any standardised way to solve this?
Like maybe stop the count?
Thanks.