Here you can find the source of calcTime(final long totalTime)
Parameter | Description |
---|---|
totalTime | Time in milliseconds |
public static String calcTime(final long totalTime)
//package com.java2s; import java.text.DecimalFormat; public class Main { private final static DecimalFormat timeFormat = new DecimalFormat("00.00"); /**//from www . java 2 s .c om * Calculate time from milliseconds * * @param totalTime Time in milliseconds * @return Time in the format mm:ss.ss */ public static String calcTime(final long totalTime) { return totalTime / 60000 + ":" + timeFormat.format((totalTime % 60000) / 1000); } }