System.nanoTime() - what precision ?
807599Dec 26 2006 — edited Jan 25 2007Hi, I am doing some tests, where it is essential to have finer accuracy than milliseconds.
Different from some posts here, I have better results on windows than on linux!
On linux System.nanoTime() rounds up the values with 1000 ns accuracy (e.g. 1000, 3000, ...). On windows xp it returns more accurate values (e.g. 2345, 6789). What is the reason for that? How is System.nanoTime() implemented and which kernel function does it use? Is there any possibility to make the function more precise for linux?
Does someone have any idea?
cheers