|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectshoddybattle.util.TimeInterval
public class TimeInterval
This class represents a difference between two times, rather than an an absolute value of time. It allows formatting of the interval as such.
Constructor Summary | |
---|---|
TimeInterval(long length)
Create a time interval with the given length. |
Method Summary | |
---|---|
java.lang.String |
getApproximation()
Format the interval as a string, giving a fairly good approximation of the length of the interval. |
static TimeInterval |
getDeltaInterval(java.util.Date future)
Create a time interval based on the absolute value of the difference between the given Date and the current time. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TimeInterval(long length)
length
- the length of the time interval in millisecondsMethod Detail |
---|
public static TimeInterval getDeltaInterval(java.util.Date future)
public java.lang.String getApproximation()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |