Here you can find the source of formatDuration(final long seconds)
public static String formatDuration(final long seconds)
//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 }