Here you can find the source of toReadableMinutes(long time)
Parameter | Description |
---|---|
time | the time to be converted |
public static String toReadableMinutes(long time)
//package com.java2s; public class Main { /**/*from w w w . j av a 2s . co m*/ * Converts a time format in long form to a human-readable minute value * @param time the time to be converted * @return the human-readable minute value */ public static String toReadableMinutes(long time) { if (time > 3600) { return String.format("%d:%02d:%02d", time / 3600, (time % 3600) / 60, (time % 60)); } else { return String.format("%d:%02d", (time % 3600) / 60, (time % 60)); } } }