Answer the question
In order to leave comments, you need to log in
How to measure the execution time of a piece of code?
The essence of the question is, there is a package of sorting algorithms, each algorithm is implemented in a separate class, how to measure the sorting execution time? nanoTime() and currentTimeMillis() are somehow lost in this regard, nanoTime() smokes in threads, currentTimeMillis() accuracy is lame. Help, gentlemen. It is desirable to have your own solution methods from life experience, and not links to lectures and video reviews about timestamps.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question