Need a CountdownTimer which is accurate and can be paused by android

I have a countdown timer that counts down from 60 to 0 seconds. I had fun (no!) Trying to get the CountDownTimer to pause and be exact before Timing.

android CountDownTimer - additional milliseconds of delay between ticks

The above link fixes some inaccuracies, but the display sometimes starts in 60 seconds and sometimes in 59 seconds.

Also, I need to be able to pause the timer. I tried to use this implementation to pause, but this implementation was based on Android CountDownTimer and has the inaccuracies discussed in the first link:

http://www.java2s.com/Open-Source/Android/Timer/multitimer-android/com/cycleindex/multitimer/CountDownTimerWithPause.java.htm

Anyone have any ideas on how to implement CountDownTimer with exact precision?

+3


source to share


1 answer


Just take a look at the answer from Sam here , the most accurate one I found!



+1


source







All Articles