Here you can find the source of getMinutesRapp(long microseconds)
Parameter | Description |
---|---|
microseconds | a parameter |
public static String getMinutesRapp(long microseconds)
//package com.java2s; //License from project: Apache License public class Main { /**//from w w w .j ava 2 s. com * Returns rappresentation of time in 00:00 format * * @param microseconds * @return */ public static String getMinutesRapp(long microseconds) { int sec = (int) (microseconds / 1000000); int min = sec / 60; sec = sec % 60; String ms = min + ""; String ss = sec + ""; if (ms.length() < 2) { ms = "0" + ms; } if (ss.length() < 2) { ss = "0" + ss; } return ms + ":" + ss; } }