Java Time Format formatTimeDigital(int time)

Here you can find the source of formatTimeDigital(int time)

Description

format Time Digital

License

Open Source License

Declaration

public static String formatTimeDigital(int time) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String formatTimeDigital(int time) {
        int mins = time / 60;
        int secondsInteger = time % 60;
        String seconds = String.valueOf(secondsInteger);
        if (seconds.length() == 1) {
            seconds = "0" + seconds;
        }//w  w  w.  j  a  va 2 s .  com
        return mins + ":" + seconds;
    }
}

Related

  1. formatTimeDeltaValue(long delta)
  2. formatTimeDiff(long finishTime, long startTime)
  3. formatTimeDiff(long finishTime, long startTime)
  4. formatTimeDifference(long ms)
  5. formatTimeDifference(long time1, long time2)
  6. formatTimeDuringHour(long mss)
  7. formatTimeElapsed(long p_millis)
  8. formatTimeInfo(long time)
  9. formatTimeInMilisec(long time)