Here you can find the source of formatSeconds(long time)
private static String formatSeconds(long time)
//package com.java2s; public class Main { public static final long SECONDS_IN_MILLIS = 1000L; public static final String SECONDS = " seconds"; private static String formatSeconds(long time) { long kbsize = Math.round((float) time / SECONDS_IN_MILLIS); //format 0 decimal places return String.valueOf(kbsize) + SECONDS; }/*from ww w. jav a 2s.c o m*/ }