I have an app that has 2 timers starting on their button clicks.
When they start, the timer countdown shows up in a text view so the user sees the seconds counting down (10,9,8,7, etc)
One counter is a 45 second timer, the other a 30 second timer. I have noticed that when the timers start they act one of two ways either the timer countdown shows the seconds starting at the proper one (then skips one) 45, 43, 42, 41, etc) or the other time it doesn't show the start value and jumps directly to (44, 43, 42, 41, etc) and doesn't skip any.
Ultimately I'd like these timers to show the initial value and countdown reasonably. I.e. always display 45 first, then 44, 43,42,41 etc.
Any thoughts on why this may or may not be doing it? I'm using the android CountDownTimer in my class.
Updated: here is my code for my CountDownTimer
public CountDown (long millisInFuture, long countDownInterval, Button button ) {
super(millisInFuture, countDownInterval);
this.button = button;
}
//Timer Countdown
@Override
public void onTick(long millisUntilFinished) {
long timeRemaining = (millisUntilFinished/1000);
button.setText((millisUntilFinished/1000)+"");