Here you can find the source of millisToString(float millis)
public static String millisToString(float millis)
//package com.java2s; //License from project: Open Source License public class Main { public static String millisToString(float millis) { //String timeString; int s = (int) millis % 60; int m = ((int) ((millis / 60) % 60)); /*StringBuilder builder = new StringBuilder(); if (m != 0)//from w w w .j av a2 s .c o m { builder.append(m).append("m:"); } builder.append(s).append("s"); timeString = builder.toString(); return timeString;*/ return (m < 10 ? "0" : "") + m + ":" + (s < 10 ? "0" : "") + s; } }