@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.AsyncEvent ? 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);
| Constructor and Description |
|---|
Clock()
This constructor for the abstract class may allocate objects within
the same
MemoryArea that holds the implicit this argument. |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
drivesEvents() |
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. |
abstract void |
registerCallBack(AbsoluteTime t,
ClockCallBack clockEvent) |
abstract boolean |
resetTargetTime(AbsoluteTime time) |
public Clock()
MemoryArea that holds the implicit this argument.
Allocates resolution here.public static Clock getRealtimeClock()
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 destis null, allocate a new
AbsoluteTime instance to hold the returned value.dest value.@SCJAllowed public abstract RelativeTime getResolution()
@SCJAllowed public abstract RelativeTime getEpochOffset()
RealtimeClock.RealtimeClock.@SCJAllowed public abstract RelativeTime getResolution(RelativeTime dest)
dest.dest - If dest is null, allocate a new
RelativeTime instance to hold the returned value.dest value.@SCJAllowed public abstract boolean drivesEvents()
@SCJAllowed(value=LEVEL_1) public abstract void registerCallBack(AbsoluteTime t, ClockCallBack clockEvent)
@SCJAllowed(value=LEVEL_1) public abstract boolean resetTargetTime(AbsoluteTime time)