I saw on the Internet that I was supposed to use System.nanoTime() but that doesn\'t work for me - it gives me the time with milliseconds precision. I just need
System.nanoTime()
That's weird. System.nanoTime() is supposed to work. Are you using the Sun JVM?
Can you just repeat your operation 1000 times and divide the time by 1000 to find out what you need to know?