Java Second Format formatSeconds(long time)

Here you can find the source of formatSeconds(long time)

Description

format Seconds

License

Open Source License

Declaration

private static String formatSeconds(long time) 

Method Source Code

//package com.java2s;

public class Main {
    public static final long SECONDS_IN_MILLIS = 1000L;
    public static final String SECONDS = " seconds";

    private static String formatSeconds(long time) {
        long kbsize = Math.round((float) time / SECONDS_IN_MILLIS); //format 0 decimal places
        return String.valueOf(kbsize) + SECONDS;
    }/*from ww  w. jav a 2s.c o  m*/
}

Related

  1. formatSeconds(long s, boolean letters)
  2. formatSeconds(long seconds)
  3. formatSeconds(long seconds)
  4. formatSeconds(long secsIn)
  5. formatSeconds(long time)
  6. formatSeconds(long time, String timerPrecisionId, boolean round)
  7. formatSecondsRegular(int seconds)
  8. formatSecondsWithHour(int seconds)
  9. formatTimeInSeconds(int v)