How do I get a method's execution time?
Is there a Timer utility class for things like timing how long a task takes, etc?
Most of the searches on Google return results for timers that schedule threads and tasks, which …
I want to write a java annotation which times the method call. something like this:
@TimeIt
public int someMethod() { ... }
and when this method is invoked, it should output on console how long this method took
I know how to do …
I frequent wrap code in a System.nanoTime() pair in order to timing it. Something like:
long start = System.nanoTime();
methodToBeTimed();
long elapsedTime = System.nanoTime() - start;
There is any good timing library that helps with this problem? Also homegrown …