@SCJAllowed public abstract class Clock extends java.lang.Object
Clock.getTime(). Clock instance returned by getRealtimeClock()
may be used in any context that requires a clock.getTime with dest
differs from getTime with no arguments.
It is made consistent below.
- semantic issue: EpochOffSet must be relative to
RealTimeClock?
- implementation issue:
The constructor public Clock() is public,
if user-defined clocks are allowed, else package protected.
- implementation issue: Omitted ? , - the following methods are not implemented:
- public abstract boolean drivesEvents();
- public abstract void registerCallBack(AbsoluteTime t, ClockCallBack clockEvent);
- public abstract boolean resetTargetTime(AbsoluteTime time);
| Modifier and Type | Method and Description |
|---|---|
abstract RelativeTime |
getEpochOffset()
Returns the relative time of the offset of the epoch of this clock
from the Epoch of the
RealtimeClock. |
static Clock |
getRealtimeClock() |
abstract RelativeTime |
getResolution()
Gets the resolution of the clock, the nominal interval between ticks.
|
abstract RelativeTime |
getResolution(RelativeTime dest)
Gets the resolution of the clock, the nominal interval between ticks
and stores the result in
dest. |
abstract AbsoluteTime |
getTime()
Creates a new object representing now of this clock.
|
abstract AbsoluteTime |
getTime(AbsoluteTime dest)
Stores now of this clock in
dest. |
@SCJAllowed public abstract RelativeTime getEpochOffset()
RealtimeClock.RealtimeClock.
The returned object is associated with this clock.public static Clock getRealtimeClock()
Clock.@SCJAllowed public abstract RelativeTime getResolution()
@SCJAllowed public abstract RelativeTime getResolution(RelativeTime dest)
dest.dest - if dest is null, allocate a new
RelativeTime instance to hold the returned value.dest is not null, it is set to the resolution
object of this. Otherwise a newly allocated object is
returned. The returned object is associated with this clock.@SCJAllowed public abstract AbsoluteTime getTime()
AbsoluteTime object whose time is now of this clock.@SCJAllowed public abstract AbsoluteTime getTime(AbsoluteTime dest)
dest.dest - If dest is null, allocate a new
AbsoluteTime instance to hold the returned value.