Returning time taken
tweekley49 opened this issue · 1 comments
tweekley49 commented
fwsGonzo commented
So, there are some problems with our timers. If you are running in a VM without hardware acceleration (no Intel VMX or Amd SVM) then the OS will have to be emulated inside Qemu (and other hypervisors), and everything becomes unpredictable to say the least.
We also have a KVMCLOCK implementation that has issues on google cloud, so we disabled it, but those timers are the most high precision outside of actual instruction counting.
Now, should you find yourself with hardware accelerated VM, I would use cycle counting almost always. For that you can use os::nanos_since_boot() etc.