private String getRunTime() { String start = new Date.getTime(); String end= new Date.getTime(); long l = start - end; long day = l / (24 * 60 * 60 * 1000); long hour = (l / (60 * 60 * 1000) - day * 24); long min = ((l / (60 * 1000)) - day * 24 * 60 - hour * 60); long s = (l / 1000 - day * 24 * 60 * 60 - hour * 60 * 60 - min * 60); String str = day + " day " + hour + " hour " + min + " min " + s + " sec "; return str; }