Java Millisecond Convert milliSecsToTime(double current, double max, double buffer)

Here you can find the source of milliSecsToTime(double current, double max, double buffer)

Description

milli Secs To Time

License

Apache License

Declaration

public static String milliSecsToTime(double current, double max, double buffer) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static String milliSecsToTime(double current, double max, double buffer) {
        int currentSec = (int) (current / 1000);
        int maxSec = (int) (max / 1000);
        int bufPer = Math.min((int) ((buffer * 100) / max), 100);
        return String.format("%3d:%02d /%3d:%02d [%3d%%]", Integer.valueOf(currentSec / 60),
                Integer.valueOf(currentSec % 60), Integer.valueOf(maxSec / 60), Integer.valueOf(maxSec % 60),
                Integer.valueOf(bufPer));
    }//from  www . j a  v a  2s.com
}

Related

  1. millisecondsToTimeString(int milliseconds)
  2. millisecondToDate(long timeMillis)
  3. millisecondToDate(String str)
  4. millisecondToDHMS(long duration)
  5. millisecsToSecs(long millisecs)
  6. milliSecToString(final long mS)
  7. milliSecToTime(double millis)
  8. millisToCycles(double millis, double hz)
  9. millisToDateString(Long Millis)