Here you can find the source of convertTime(long time)
public static String convertTime(long time)
//package com.java2s; //License from project: Open Source License public class Main { public static String convertTime(long time) { double h = time / 3600000.0; double m = (h - Math.floor(h)) * 60.0; double s = (m - Math.floor(m)) * 60; // return String.format("%02d:%02d:%02d", hour, minutes, seconds); return String.format("%s%02d:%02d", (((int) h > 0) ? String.format("%02d:", (int) h) : ""), (int) m, (int) s); }//from www.jav a2s . c o m }