what is the most precise time I can get in JDK?

Weijun Wang weijun.wang at oracle.com
Wed Nov 16 04:55:54 UTC 2011


Hi All

I need a precise time, and is currently using java.util.Date, which 
knows about milliseconds, but unfortunately the precision is only 10-15 
milliseconds on a Windows.

In fact, I don't really need it to be so correct. My requirements are:

1. It's enough correct, say, at least as correct as Date.
2. It's precise in a relative sense, i.e. it changes fast
3. It should be monotonic, i.e. it grows, unless the user adjusts the 
system clock

Thanks
Max



More information about the core-libs-dev mailing list