|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.util.TimeUtil
public class TimeUtil
Utility for times.
| Field Summary | |
|---|---|
static byte |
DAY
Time unit constant. |
static byte |
HOUR
Time unit constant. |
static byte |
MILLISECOND
Time unit constant. |
static byte |
MINUTE
Time unit constant. |
static byte |
SECOND
Time unit constant. |
| Constructor Summary | |
|---|---|
TimeUtil()
|
|
| Method Summary | |
|---|---|
static int |
elapsedSeconds(long startStamp,
long endStamp)
Returns (in seconds) the time elapsed between the supplied start and end timestamps (which must be in milliseconds). |
static String |
getTimeOrderString(long duration,
byte minUnit)
Get a translatable string specifying the magnitude of the specified duration. |
static String |
getTimeOrderString(long duration,
byte minUnit,
byte maxUnit)
Get a translatable string specifying the magnitude of the specified duration, with the units of time bounded between the minimum and maximum specified. |
static String |
getTimeString(long duration,
byte minUnit)
Get a translatable string specifying the duration, down to the minimum granularity. |
static String |
getTimeString(long duration,
byte minUnit,
boolean roundUp)
Get a translatable string specifying the duration, down to the minimum granularity. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final byte MILLISECOND
public static final byte SECOND
public static final byte MINUTE
public static final byte HOUR
public static final byte DAY
| Constructor Detail |
|---|
public TimeUtil()
| Method Detail |
|---|
public static int elapsedSeconds(long startStamp,
long endStamp)
public static String getTimeOrderString(long duration,
byte minUnit)
public static String getTimeOrderString(long duration,
byte minUnit,
byte maxUnit)
public static String getTimeString(long duration,
byte minUnit)
public static String getTimeString(long duration,
byte minUnit,
boolean roundUp)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||