|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.amicofragile.time.SystemTime
public final class SystemTime
System time access abstraction class.
Field Summary | |
---|---|
private static TimeSource |
DEFAULT_TIME_SOURCE
Default TimeSource : this TimeSource delegates to System.currentTimeMillis() . |
private static TimeSource |
timeSource
Current TimeSource in use. |
Constructor Summary | |
---|---|
protected |
SystemTime()
This constructor throws InstantiationException at every invocation: this class is designed for static use only. |
Method Summary | |
---|---|
static long |
currentTimeInMillis()
Gets current time in milliseconds. |
static void |
reset()
Resets TimeSource provider to default. |
static void |
setTimeSource(TimeSource timeSource)
Sets TimeSource provider to use. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final TimeSource DEFAULT_TIME_SOURCE
TimeSource
: this TimeSource
delegates to System.currentTimeMillis()
.
private static TimeSource timeSource
TimeSource
in use.
Constructor Detail |
---|
protected SystemTime() throws InstantiationException
InstantiationException
- The class is designed for static use onlyMethod Detail |
---|
public static long currentTimeInMillis()
public static void setTimeSource(TimeSource timeSource)
timeSource
- TimeSource
provider to usepublic static void reset()
TimeSource
provider to default.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |