Android Open Source - AndroidLapTimer Utils






From Project

Back to project page AndroidLapTimer.

License

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.

Java Source Code

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();
  }
}




Java Source Code List

com.pimentoso.android.laptimer.DefaultPreferences.java
com.pimentoso.android.laptimer.FPSCounter.java
com.pimentoso.android.laptimer.LapListAdapter.java
com.pimentoso.android.laptimer.SensitivityDialogActivity.java
com.pimentoso.android.laptimer.TimerActivity.java
com.pimentoso.android.laptimer.Utils.java