public final class MITimespan extends Object implements Comparable, Serializable
| Constructor and Description |
|---|
MITimespan(int days,
int hours,
int minutes,
double seconds)
Constructs a new instance.
|
MITimespan(long milliseconds)
Constructs a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(MITimespan timespan) |
boolean |
equals(Object o) |
int |
getDays()
Returns the number of days in the timespan.
|
int |
getHours()
Returns the number of hours in the timespan.
|
int |
getMinutes()
Returns the number of minutes in the timespan.
|
double |
getSeconds()
Returns the number of seconds in the timespan.
|
long |
getTimespanInMilliSeconds()
Returns the timespan as the number of milliseconds since the Epoch.
|
int |
hashCode() |
String |
toString() |
public MITimespan(int days,
int hours,
int minutes,
double seconds)
days - number of dayshours - number of hoursminutes - number of minutesseconds - number of seconds (accurate to the millisecond)public MITimespan(long milliseconds)
Calendar.getTimeInMillis() or System.currentTimeMillis().milliseconds - time in milliseconds to use to initialize this instance.public long getTimespanInMilliSeconds()
Calendarpublic int getDays()
public int getHours()
public int getMinutes()
public double getSeconds()
public int compareTo(MITimespan timespan)
compareTo in interface Comparable© 2007, 2022 Precisely. All rights reserved.