long startTime = System.nanoTime(); myCall(); long stopTime = System.nanoTime(); System.out.println(stopTime - startTime);