Here you can find the source of toHumanable(long time_millsecod)
public static String toHumanable(long time_millsecod)
//package com.java2s; //License from project: Open Source License public class Main { public static String toHumanable(long time_millsecod) { long second = time_millsecod / 1000; if (second < 60) { return second + "s"; } else if (second < 60 * 60) { return second / (60) + "min"; } else if (second < 60 * 60 * 24) { return second / (60 * 60) + "hour"; } else {/*from w ww .j a va 2 s.co m*/ return second / (60 * 60 * 24) + "day"; } } }