Here you can find the source of getNumberOfMinutes(long milliseconds)
public static String getNumberOfMinutes(long milliseconds)
//package com.java2s; public class Main { public static final long MILLISECONDS_IN_A_MINUTE = 60000; public static String getNumberOfMinutes(long milliseconds) { long minutes = milliseconds / MILLISECONDS_IN_A_MINUTE; long remainder = milliseconds % MILLISECONDS_IN_A_MINUTE; return minutes + " minutes, " + (remainder / 1000) + " seconds"; }/* w w w. j a v a 2s . c o m*/ }