The Matter of Time()

The Matter of Time()

Moreover, if we measure the latency by measuring the execution time, it will be way below 1 millisecond, so it’s maybe not a surprise that the answer to the first question was yes. Apparently, the time returned by this clock isn’t related to any real-world time; it can only be used to compare the timestamps within the same JVM instance, and it’s relative to an arbitrary “origin” which can be in the future, and therefore it might be negative – which answers the sixth question. Here comes the first surprise: nano time is indeed monotonic but only if the underlying operating system supports it.

Source: serce.me