I was testing some algorithms which I surrounded with a nanoseconds timer when I randomly forgot to remove the timer I found out that this code:
a = System.nanoTime();
System.out.println(System.nanoTime() - a);
always prints 4400 nano seconds on my system. That would be 4.4 microseconds whereas this code:
a = System.currentTimeMillis();
for (int i = 0; i < 1000; i++)
System.nanoTime();
System.out.println(System.currentTimeMillis() - a);
Prints 0