Is System.nanoTime() consistent across threads?

后端 未结 1 754
有刺的猬
有刺的猬 2020-12-19 00:54

I want to count the time elapsed between two events in nanoseconds. To do that, I can use System.nanoTime() as mentioned here. The problem is that the two event

相关标签:
1条回答
  • 2020-12-19 01:32

    It's supposed to be, but due to buggy kernels or hardware, the answer can be no, at least in some environments.

    0 讨论(0)
提交回复
热议问题