Java Second Convert secondsToTime(double seconds)

Here you can find the source of secondsToTime(double seconds)

Description

seconds To Time

License

Apache License

Declaration

public static String secondsToTime(double seconds) 

Method Source Code

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

public class Main {
    public static String secondsToTime(double seconds) {
        int hours = (int) (seconds / 3600);
        int minutes = (int) ((seconds % 3600) / 60);
        int secs = (int) (seconds % 60);
        return String.format("%02d:%02d:%02d", hours, minutes, secs);
    }//from w w w.j a  v a 2 s . c  o  m
}

Related

  1. secondsToStringWithUnits(double value)
  2. secondsToTicks(double seconds)
  3. secondsToTicks(double x)
  4. secondsToTicks(float seconds)
  5. secondsToTicks(int seconds)
  6. secondsToTime(int seconds)
  7. secondsToTime(int seconds)
  8. secondsToTime(long timeseconds)
  9. secondsToTimeClock(int totalSeconds)