Skip to main content
fix grammar
Link
Kilian Foth
  • 14.5k
  • 5
  • 43
  • 58

How to measure time taken by a Java code?

Source Link
Mangat Rai Modi
  • 5.7k
  • 9
  • 51
  • 81

How to measure time taken by a Java code?

I need to analyze complexity for some algorithms in Java. For that I am planning to give large number of input and measure the time taken by Java implementation. What is the most precise and accurate way to check time between some lines of code? I need precision in milliseconds...