Here you can find the source of getElapsedSeconds(long start, long end)
public static double getElapsedSeconds(long start, long end)
//package com.java2s; import java.math.BigDecimal; public class Main { public static double getElapsedSeconds(long start, long end) { BigDecimal seconds = new BigDecimal(end - start) .divide(new BigDecimal(1000)); return seconds.doubleValue(); }/*from w w w . jav a 2 s . c om*/ }