Skip to main content
added 304 characters in body
Source Link
Jörn Horstmann
  • 34.2k
  • 11
  • 77
  • 122

How about using System.nanoTime? I think that already uses the performance counters of the machine and there is no need to write a native wrapper.

Update: According to this article on clocks and timers in the jvm in the section "Clocks and Timers on Windows"

System.nanoTime() is implemented using the QueryPerformanceCounter/QueryPerformanceFrequency API

How about using System.nanoTime? I think that already uses the performance counters of the machine and there is no need to write a native wrapper.

How about using System.nanoTime? I think that already uses the performance counters of the machine and there is no need to write a native wrapper.

Update: According to this article on clocks and timers in the jvm in the section "Clocks and Timers on Windows"

System.nanoTime() is implemented using the QueryPerformanceCounter/QueryPerformanceFrequency API

Source Link
Jörn Horstmann
  • 34.2k
  • 11
  • 77
  • 122

How about using System.nanoTime? I think that already uses the performance counters of the machine and there is no need to write a native wrapper.