1

I have a countdown timer. The countdown timer counts down in miliseconds. I have worked out hours by using the sum:

(((millisUntilFinished / 1000) / 60) / 60)

Now minutes, I did this today and I seriously can not see how minutes works, but it does, here is what I have done for minutes...

long minsTotal = hoursS * 60;
(((millisUntilFinished / 1000) / 60) - minsTotal)

Now when I typed that in to a caluculator it awlays equated to 0... But somehow it works....

Now the seconds is where i'm stuck. To work out the seconds I have used:

long secs = (millisUntilFinished / 1000);

which works out the total seconds. However I want the highest number for it to display as 60. How could I stop if from going over 60, but still working properly?

Mat Whiteside
  • 551
  • 1
  • 5
  • 17

0 Answers0