Back to project page AndroidLapTimer.
The source code is released under:
MIT License
If you think the Android project AndroidLapTimer listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.pimentoso.android.laptimer; // ww w . ja v a 2s . c o m public class Utils { private static StringBuilder sb = new StringBuilder(); public static String convertTime(long millis) { if (millis == 0) { return "0:00:0"; } sb.setLength(0); int split = ((int) (millis / 100)) % 10; int seconds = (int) (millis / 1000); int minutes = seconds / 60; seconds = seconds % 60; if (seconds < 10) { sb.append(minutes).append(":0").append(seconds).append(":").append(split); } else { sb.append(minutes).append(":").append(seconds).append(":").append(split); } return sb.toString(); } }