@SCJAllowed public abstract class HighResolutionTime extends java.lang.Object implements java.lang.Comparable
HighResolutionTime is the base class for time given by milliseconds plus nanoseconds.
A time object in normalized form represents negative time if both components are
nonzero and negative, or one is nonzero and negative and the other is zero.
For add and subtract operations, negative values behave as they do in Java arithmetic.
AbsoluteTime set: if parameter null, no Exception?
- implementation issue:
public int compareTo (Object arg0) is inherited from interface Comparable
- implementation issue: method waitForObject omitted ?
public static void waitForObject(java.lang.Object target, HighResolutionTime time)
throws java.lang.InterruptedException
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(HighResolutionTime time)
Compares this with the specified HighResolutionTime time.
|
int |
compareTo(java.lang.Object arg0) |
boolean |
equals(HighResolutionTime time) |
Clock |
getClock() |
long |
getMilliseconds() |
int |
getNanoseconds() |
void |
set(HighResolutionTime time)
Change the value represented by this to that of the given time.
|
void |
set(long millis)
Sets the millisecond component of this to the given argument, and the nanosecond
component of this to 0.
|
void |
set(long millis,
int nanos)
Sets the millisecond and nanosecond components of this to the given arguments.
|
java.lang.String |
toString() |
static void |
waitForObject(java.lang.Object target,
HighResolutionTime time) |
public Clock getClock()
public final long getMilliseconds()
public final int getNanoseconds()
public void set(HighResolutionTime time)
time - is the new value for this. If null, this is left unchanged.public void set(long millis)
millis - is the new value of the millisecond component.public void set(long millis,
int nanos)
millis - is the new value of the millisecond component.nanos - is the new value of the nanosecond component.public boolean equals(HighResolutionTime time)
time - public int compareTo(HighResolutionTime time)
time - is the second argument to the comparison.public int compareTo(java.lang.Object arg0)
compareTo in interface java.lang.Comparablepublic java.lang.String toString()
toString in class java.lang.Object@SCJAllowed(value=LEVEL_2) public static void waitForObject(java.lang.Object target, HighResolutionTime time) throws java.lang.InterruptedException
java.lang.InterruptedException