Here you can find the source of formattedDuration(long pStartTime)
public static String formattedDuration(long pStartTime)
//package com.java2s; import java.text.DecimalFormat; public class Main { public static String formattedDuration(long pStartTime) { DecimalFormat df = new DecimalFormat("#,###,###,##0.000"); return df.format((System.currentTimeMillis() - pStartTime) / 1000.00); }// w w w . j a v a 2s.c o m }