Java Duration Format formatDuration(final long seconds)

Here you can find the source of formatDuration(final long seconds)

Description

format Duration

License

LGPL

Declaration

public static String formatDuration(final long seconds) 

Method Source Code

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

public class Main {
    public static String formatDuration(final long seconds) {
        return String.format("%d:%02d:%02d", seconds / 3600, (seconds % 3600) / 60, (seconds % 60));
    }// ww w  .j av  a2s.  c om
}

Related

  1. formatDuration(Duration duration, boolean inProgress)
  2. formatDuration(final Duration duration)
  3. formatDuration(final Duration duration, final boolean wrapInDurationFunction)
  4. formatDuration(final int duration)
  5. formatDuration(final long milliSeconds)
  6. formatDuration(int durationMins)
  7. formatDuration(int seconds)
  8. formatDuration(int seconds)
  9. formatDuration(long duration)