J
Jeremy Watts
hi,
how would you measure the execution time of a java method?
how would you measure the execution time of a java method?
Jeremy said:how would you measure the execution time of a java method?
Jeremy said:how would you measure the execution time of a java method?
Alexander Lueck said:long start = System.currentTimeMillis();
...
doSomething();
...
long end = System.currentTimeMillis();
System.out.println("Execution time was "+(end-start)+" ms.");
Greetings
Alex
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.