For some reason I am getting a consistent 3600 returned by the function:
private static long getCountdownLeft() {
long now = System.currentTimeMillis();
Hey I have just added print statements for prev, new and elapsed variables. The values are
previous time 1343882409054
present time 1343882409054
elapsed time 0
Time is 3600
So your millisLeft will always be 3600 .
But if you try using
System.nanoTime()
the values are,
previous time 519222175869357
present time 519222175923421
elapsed time 54064
Time is 3545
So you have to be more granular here and consider using System.nanoTime().