Last Updated: February 25, 2016
·
342
· ottovanluchene

Debug: how long did the process took (Time)

//At start of the code (start of process)
final long start = System.currentTimeMillis();

//At the end of the code (end of process)
long milliseconds = System.currentTimeMillis() - start;
long seconds = milliseconds/1000;

LOG.debug("Total search took: " + milliseconds + "Milliseconds || " + seconds + "Seconds");