Java TimeUnit Usage millisToStringConvert(long millis)

Here you can find the source of millisToStringConvert(long millis)

Description

millis To String Convert

License

Apache License

Declaration

public static String millisToStringConvert(long millis) 

Method Source Code

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

import java.util.Locale;
import java.util.concurrent.TimeUnit;

public class Main {
    public static String millisToStringConvert(long millis) {
        return String.format(Locale.getDefault(), "%d min, %d sek", TimeUnit.MILLISECONDS.toMinutes(millis),
                TimeUnit.MILLISECONDS.toSeconds(millis)
                        - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(millis)));
    }/*from  ww w.j a v  a 2 s. c o m*/
}

Related

  1. millisToHMSms(long millis)
  2. millisToReadableTime(long milliseconds)
  3. millisToString(double millis)
  4. millisToString(long millis)
  5. millisToString(long ms)
  6. millisToTime(long millis)
  7. millisToTimeDelta(long millis)
  8. min()
  9. minutesBetween(Date date1, Date date2)