I’m trying to track down the native code for System’s nanoTime() method. I’m particularly interested in knowing whether it’s a constant time operation. Incidentally, I’m also curious to know how one might measure the time it takes for the method to execute.
EDIT:
I’m aware that any question of the method being constant time relies on there being some ‘n’ value. I don’t know how the method works, so was wondering if there might be some ‘n’ value upon which the method depends, written in the code. Any pointers towards the native code would be great.