Here you can find the source of formatMinutes(long time)
public static String formatMinutes(long time)
//package com.java2s; //License from project: Open Source License public class Main { public static String formatMinutes(long time) { if (time == Long.MAX_VALUE) { return "DNF"; }//from ww w . j a va 2 s. co m String sign = ""; if (time < 0) { sign = "-"; time = -time; } time = (time + 5) / 10; long minutes = time / 6000; long seconds = (time / 100) % 60; long centiseconds = time % 100; return sign + (minutes < 10 ? "0" + minutes : minutes) + ":" + (seconds < 10 ? "0" + seconds : seconds) + "." + (centiseconds < 10 ? "0" + centiseconds : centiseconds); } }