Here you can find the source of milliSecToTime(double millis)
public static String milliSecToTime(double millis)
//package com.java2s; //License from project: Apache License public class Main { public static String milliSecToTime(double millis) { int sec = (int) (millis / 1000); return String.format("%3d:%02d", Integer.valueOf(sec / 60), Integer.valueOf(sec % 60)); }/*from ww w .j a va2 s . com*/ }