|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlejos.realtime.Clock
public abstract class Clock
Constructor Summary | |
---|---|
Clock()
|
Method Summary | |
---|---|
abstract RelativeTime |
getEpochOffset()
Returns the relative time of the offset of the epoch of this clock from the Epoch. |
static Clock |
getRealtimeClock()
There is always at least one clock object available: the system real-time clock. |
abstract RelativeTime |
getResolution()
Gets the resolution of the clock, the nominal interval between ticks. |
abstract AbsoluteTime |
getTime()
Gets the current time in a newly allocated object. |
abstract AbsoluteTime |
getTime(AbsoluteTime dest)
Gets the current time in an existing object. |
abstract void |
setResolution(RelativeTime resolution)
Set the resolution of this. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Clock()
Method Detail |
---|
public abstract RelativeTime getEpochOffset()
UnsupportedOperationException
- Thrown if the clock does not have the concept of date.public static Clock getRealtimeClock()
public abstract RelativeTime getResolution()
public abstract AbsoluteTime getTime()
public abstract AbsoluteTime getTime(AbsoluteTime dest)
dest
- The instance of AbsoluteTime object which will be updated in
place. The clock association of the dest parameter is ignored. When dest
is not null the returned object is associated with this clock. If dest
is null, then nothing happens.
public abstract void setResolution(RelativeTime resolution)
resolution
- The new resolution of this, if the requested value is supported
by this clock. If resolution is smaller than the minimum resolution
supported by this clock then it throws IllegalArgumentException. If the
requested resolution is not available and it is larger than the minimum
resolution, then the clock will be set to the closest resolution that
the clock supports, via truncation. The value of the resolution
parameter is not altered. The clock association of the resolution
parameter is ignored.
IllegalArgumentException
- Thrown if resolution is null, or if the requested resolution is
smaller than the minimum resolution supported by this clock.
UnsupportedOperationException
- Thrown if the clock does not support setting its resolution.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |