java measure method execution time

www.lau‮moc.irutt‬
java measure method execution time
long startTime = System.nanoTime();
myMethod(); 
long stopTime = System.nanoTime();
System.out.println(stopTime - startTime);
Created Time:2017-09-27 13:38:15  Author:lautturi