Here you can find the source of timeToString(double d)
public static String timeToString(double d)
//package com.java2s; //License from project: Open Source License public class Main { /** A constant indicating that there is no valid data. */ public static final double NO_DATA_D = Double.NEGATIVE_INFINITY; public static String timeToString(double d) { if (d == NO_DATA_D) { return "No Data"; } else {//from w w w .ja v a 2s. c o m int minutes = ((int) d) / 60; int seconds = ((int) d) - (minutes * 60); return String.valueOf(minutes) + ":" + String.valueOf(seconds); //return FORMAT.format(d); } } }