Here you can find the source of getSecondsToHHMMSS(double seconds)
public static String getSecondsToHHMMSS(double seconds)
//package com.java2s; /*/*from ww w .j a v a 2 s . c om*/ * Copyright (C) 2012-2015, Juan Manuel Barrios <http://juan.cl/> * All rights reserved. * * This file is part of P-VCD. http://p-vcd.org/ * P-VCD is made available under the terms of the BSD 2-Clause License. */ public class Main { public static String getSecondsToHHMMSS(double seconds) { long seg = Math.round(seconds); long hh = seg / 3600; seg = seg % 3600; long mm = seg / 60; seg = seg % 60; return (hh < 10 ? "0" : "") + hh + ":" + (mm < 10 ? "0" : "") + mm + ":" + (seg < 10 ? "0" : "") + seg; } }