Here you can find the source of elapsedMillis(long startTime)
public static long elapsedMillis(long startTime)
//package com.java2s; public class Main { public static long elapsedMillis(long startTime) { return (long) elapsedTime(startTime, System.nanoTime(), 1e6); }/* ww w. j a v a 2 s .c o m*/ private static double elapsedTime(long startTime, long endTime, double units) { return (endTime - startTime) / units; } }