0

From my research, System.currentTimeMillis() is not always accurate, especially on windows. I'm currently carrying out microbenchmarking on a Windows 10 machine. Would switching over to say, a linux VM give me more accurate results when using the method? Thanks.

  • 2
    Meaningful microbenchmarks are hard to write, and then the results are only really meaningful on the JVM on which you ran them. Use a microbenchmarking framework like JMH or Caliper to free you from having to think about a lot of the very hard details. – Andy Turner Feb 23 '18 at 14:43
  • 1
    ...while pushing you toward being sufficiently rigorous for the results to have some meaning. :-) – T.J. Crowder Feb 23 '18 at 14:45

0 Answers0