Here you can find the source of getElapsed(long start, long end)
private static double getElapsed(long start, long end)
//package com.java2s; import java.math.BigDecimal; public class Main { private static double getElapsed(long start, long end) { BigDecimal d = new BigDecimal(end - start).divide(new BigDecimal( 1000));//from w w w . j a v a 2 s . com return d.doubleValue(); } }