|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.realtime.HighResolutionTime
Class HighResolutionTime
is the base class for AbsoluteTime, RelativeTime, RationalTime.
Constructor Summary | |
HighResolutionTime()
|
Method Summary | |
abstract AbsoluteTime |
absolute(Clock clock)
|
abstract AbsoluteTime |
absolute(Clock clock,
AbsoluteTime dest)
Convert this time to an absolute time, relative to some clock. |
int |
compareTo(HighResolutionTime time)
Compares this HighResolutionTime with the specified HighResolutionTime. |
int |
compareTo(java.lang.Object object)
For the Comparable interface. |
boolean |
equals(HighResolutionTime time)
Returns true if the argument object has the same values as this. |
boolean |
equals(java.lang.Object object)
Returns true if the argument is a HighResolutionTime reference and has the same values as this. |
long |
getMilliseconds()
Returns the milliseconds component of this. |
int |
getNanoseconds()
Returns nanoseconds component of this. |
int |
hashCode()
|
abstract RelativeTime |
relative(Clock clock)
|
abstract RelativeTime |
relative(Clock clock,
RelativeTime destination)
|
void |
set(HighResolutionTime time)
Changes the time represented by the argument to some time between the invocation of the method and the return of the method. |
void |
set(long millis)
Sets the millisecond component of this to the given argument. |
void |
set(long millis,
int nanos)
Sets the millisecond and nanosecond components of this. |
static void |
waitForObject(java.lang.Object target,
HighResolutionTime time)
Behaves exactly like target.wait() but with the enhancement
thatit waits with a precision of HighResolutionTime |
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public HighResolutionTime()
Method Detail |
public abstract AbsoluteTime absolute(Clock clock, AbsoluteTime dest)
clock
- This clock is used to convert this time into absolute time.dest
- If null, a new object is created and returned as result, else dest is returned.public abstract AbsoluteTime absolute(Clock clock)
public int compareTo(HighResolutionTime time)
time
- compares with this time.public int compareTo(java.lang.Object object)
public boolean equals(HighResolutionTime time)
time
- Values are compared to this.public boolean equals(java.lang.Object object)
object
- Values are compared to this.public final long getMilliseconds()
public final int getNanoseconds()
public int hashCode()
public void set(HighResolutionTime time)
time
- The HighResolutionTime which will be set to represent the
current time.public void set(long millis)
millis
- This value will be the value of the millisecond component
of this at the completion of the call. If millis is negative the
millisecond value of this is set to negative value. Although logically
this may represent time before the epoch, invalid results may occur if
a HighResolutionTime represnting time before the epoch is given as a
parameter to the methods.public void set(long millis, int nanos)
millis
- value to set millisecond part of this.nanos
- value to set nanosecond part of this.public static void waitForObject(java.lang.Object target, HighResolutionTime time) throws java.lang.InterruptedException
target.wait()
but with the enhancement
thatit waits with a precision of HighResolutionTime
target
- The object on which to wait. The current thread must have a
lock on the object.time
- The time for which to wait. If this is RelativeTime(0,0)
then wait indefinitely.Object.wait()
,
Object.wait(long)
,
Object.wait(long,int)
public abstract RelativeTime relative(Clock clock)
public abstract RelativeTime relative(Clock clock, RelativeTime destination)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |