com.goldenhammer.utility
Class TimeElapsed
java.lang.Object
com.goldenhammer.utility.TimeElapsed
- All Implemented Interfaces:
- java.io.Serializable
- public class TimeElapsed
- extends java.lang.Object
- implements java.io.Serializable
This will convert milliseconds to HH:MM:SS.
- See Also:
- Serialized Form
Constructor Summary |
TimeElapsed(long millis)
Creates a new elapsed time object from milliseconds. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TimeElapsed
public TimeElapsed(long millis)
- Creates a new elapsed time object from milliseconds.
- Parameters:
millis
- The duration to insantiate, in milliseconds.
getHours
public int getHours()
- Returns:
- Returns the hours.
setHours
public void setHours(int hours)
- Parameters:
hours
- The hours to set.
getMinutes
public int getMinutes()
- Returns:
- Returns the minutes.
setMinutes
public void setMinutes(int minutes)
- Parameters:
minutes
- The minutes to set.
getSeconds
public int getSeconds()
- Returns:
- Returns the seconds.
setSeconds
public void setSeconds(int seconds)
- Parameters:
seconds
- The seconds to set.
toString
public java.lang.String toString()
- A convenience for printing the duration.
- See Also:
Object.toString()
getMillis
public long getMillis()
- Returns: