Here you can find the source of toTime(int time)
public static String toTime(int time)
//package com.java2s; public class Main { public static String toTime(int time) { time /= 1000;/*w w w .j a v a 2 s . c om*/ int minute = time / 60; int hour = minute / 60; int second = time % 60; minute %= 60; return String.format("%02d:%02d", minute, second); } }