3

I have a countdown timer that counts down from 60 to 0 seconds. I've been having fun (not!) trying to get CountDownTimer to work with a pause and be accurate as far as the Timing.

android CountDownTimer - additional milliseconds delay between ticks

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

In addition, I need to be able to pause the timer. I tried using this implementation for pause, but this implementation was based on Android's 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 a CountDownTimer with pause that is accurate?

Community
  • 1
  • 1
Kristy Welsh
  • 7,828
  • 12
  • 64
  • 106

1 Answers1

1

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

Community
  • 1
  • 1
ΦXocę 웃 Пepeúpa ツ
  • 47,427
  • 17
  • 69
  • 97