Here you can find the source of transMillionToTime(long milliseconds)
public static String transMillionToTime(long milliseconds)
//package com.java2s; public class Main { public static String transMillionToTime(long milliseconds) { int seconds = (int) milliseconds / 1000; int minute = seconds / 60; int second = seconds % 60; String minStr = minute < 10 ? "0" + minute : String.valueOf(minute); String secStr = second < 10 ? "0" + second : String.valueOf(second); String time = minStr + ":" + secStr; return time; }/*from ww w . jav a 2s .co m*/ }