What I would like to know is whether I should use System.currentTimeMillis() or System.nanoTime()<
Since no one else has mentioned this…
It is not safe to compare the results of System.nanoTime()
calls between different threads. Even if the events of the threads happen in a predictable order, the difference in nanoseconds can be positive or negative.
System.currentTimeMillis()
is safe for use between threads.