I made a little program to test the System.currentTimeMillis (). And I have a strange result. This is my logs :
1 26-12-09 20:48:21 - [Log] lTime = 1261860501
System.currentTimeMillis()
is dependent on System clock. It looks like the system clock has been micro-corrected by an external programme, for Linux that's probably NTP.
Note you shouldn't use System.currentTimeMillis()
to measure elapsed time. It's better to use System.nanoTime()
but even that isn't guaranteed to be monotonic.