Here you can find the source of intToMmss(int ns)
public static String intToMmss(int ns)
//package com.java2s; //License from project: Open Source License public class Main { public static String intToMmss(int ns) { if (ns < 10) return "0:0" + ns; if (ns < 60) return "0:" + ns; int rem = ns % 60; if (rem < 10) return ns / 60 + ":0" + rem; else//from w ww.j av a 2s. c o m return ns / 60 + ":" + rem; } }