Time precision in Java

Do not use System.currentTimeMillis() on Windows platform.
Use JDK 1.5 and System.nanoTime()

I read the source of JDK 1.5, the implementation of System.nanoTime is:
QueryPerformanceCounter on Windows ( the highest precision method on Windows)
gettimeofday for most Linux ( 1 microsecond precsion, just print the nanosecond, if it ends with 000, then JVM uses gettimeofday)

However the implementation of System.cuurentTimeMillis() is:
GetSystemTimeAsFileTime on Windows which has only 10 - 15ms granularity on Windows XP and 2000
on Linux, it still uses gettimeofday, just divide the microseconds wth 1000.

However, the java.util.Timer still used System.currentTimeMillis() in JDK 1.5, so it can not get a frequecy higher than 65Hz on Windows platform.

Hope this be useful.