See this piece about System.nanoTime():
I think it generally applies to System.currentTimeMillis as well,
but since my post was about System.nanoTime, it did not bothered
to follow-up. However, the original benchmark project still measures
the currentTimeMillis costs:
The data I've got from multiple sources is that currentMillis actually
scales pretty well, sometimes much better than nanoTime, but at the
expense of much, much higher granularity. That seems to be because
the timer value that backs the syscall for current time is actually updated
by OSes themselves.
-Aleksey.