Java Time Format formatTime(int time)

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

Description

format Time

License

Open Source License

Declaration

public static String formatTime(int time) 

Method Source Code

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

public class Main {
    public static String formatTime(int time) {
        //seconds ROUND UP!
        int seconds = (int) Math.ceil((time % 6000) / 100.0);
        int minutes = time / 6000;
        if (seconds == 60) {
            seconds = 0;/*from  w w  w.  jav  a  2 s  .co m*/
            minutes++;
        }
        return String.format("%02d:%02d", minutes, seconds);
    }
}

Related

  1. formatTime(int seconds)
  2. formatTime(int seconds)
  3. formatTime(int seconds)
  4. formatTime(int secs)
  5. formatTime(int time)
  6. formatTime(int time)
  7. formatTime(int time)
  8. formatTime(int time)
  9. formatTime(int value)