Java Time Format format(String format, long time)

Here you can find the source of format(String format, long time)

Description

format

License

Open Source License

Declaration

public static String format(String format, long time) 

Method Source Code

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

public class Main {
    public static String format(String format, long time) {
        long seconds = (time / 1000) % 60;
        long minutes = (time / (1000 * 60)) % 60;
        long hours = (time / (1000 * 60 * 60)) % 24;
        return String.format(format, hours, minutes, seconds);
    }// ww w .  java  2s  .c om
}

Related

  1. compareTime(String time1, String time2, String dateFormat)
  2. createTimeFormatter(String languageCode)
  3. format(long time)
  4. format(long time)
  5. format(long time, String timerPrecisionId, boolean round)
  6. formatBenchResult(final String benchName, final int iterationCount, final int benchNumber, final double benchTime)
  7. formatCooldown(long time)
  8. formatDateTime(String DateTimeStr)
  9. formatDateTime(String s)