|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.realtime.HighResolutionTime
javax.realtime.RelativeTime
javax.realtime.RationalTime
public class RationalTime
Jamaica Real-Time Specification for Java class RationalTime
Constructor Summary | |
---|---|
RationalTime(int frequency)
Deprecated. RTSJ V1.0.1 class RationalTime is deprecated |
|
RationalTime(int frequency,
long millis,
int nanos)
Deprecated. RTSJ V1.0.1 class RationalTime is deprecated |
|
RationalTime(int frequency,
RelativeTime interval)
Deprecated. RTSJ V1.0.1 class RationalTime is deprecated |
Method Summary | |
---|---|
AbsoluteTime |
absolute(Clock clock,
AbsoluteTime destination)
Deprecated. RTSJ V1.0.1 class RationalTime is deprecated |
void |
addInterarrivalTo(AbsoluteTime destination)
Deprecated. RTSJ V1.0.1 this method is only required to support the deprecated RationalTime. |
int |
getFrequency()
Deprecated. RTSJ V1.0.1 class RationalTime is deprecated |
RelativeTime |
getInterarrivalTime()
Deprecated. RTSJ V1.0.1 this method is only required to support the deprecated RationalTime. |
RelativeTime |
getInterarrivalTime(RelativeTime dest)
Deprecated. RTSJ V1.0.1 this method is only required to support the deprecated RationalTime. |
void |
set(long millis,
int nanos)
Deprecated. set sets the milliseconds and nanoseconds value of this object to millis and nanos. |
void |
setFrequency(int frequency)
Deprecated. RTSJ V1.0.1 class RationalTime is deprecated |
Methods inherited from class javax.realtime.RelativeTime |
---|
absolute, add, add, add, add, compareToZero, negate, negate, relative, relative, scale, scale, subtract, subtract, toString |
Methods inherited from class javax.realtime.HighResolutionTime |
---|
clone, compareTo, compareTo, equals, equals, getClock, getMilliseconds, getNanoseconds, hashCode, set, set, waitForObject |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RationalTime(int frequency)
frequency
- the frequency.
IllegalArgumentException
- iff frequency is negative.public RationalTime(int frequency, long millis, int nanos) throws IllegalArgumentException
frequency
- the frequency.millis
- milliseconds of base interval.nanos
- nanoseconds of base interval.
IllegalArgumentException
- iff any argument is negative or
the frequency is 0.public RationalTime(int frequency, RelativeTime interval) throws IllegalArgumentException
frequency
- the frequency.interval
- the base interval.
IllegalArgumentException
- iff frequency is negative or
the base interval is null.Method Detail |
---|
public AbsoluteTime absolute(Clock clock, AbsoluteTime destination)
absolute
in class RelativeTime
clock
- The clock, null to use Clock.getRealtimeClock().destination
- the destination absolute time object.
ArithmeticException
- if the resulting absolute time could
not be represented by an instance of AbsoluteTime.public void addInterarrivalTo(AbsoluteTime destination)
addInterarrivalTo
in class RelativeTime
destination
- public int getFrequency()
public RelativeTime getInterarrivalTime(RelativeTime dest)
getInterarrivalTime
in class RelativeTime
dest
- The preallocated RelativeTime object to hold the
result. May be null to indicate that a new object should be
allocated.
public RelativeTime getInterarrivalTime()
getInterarrivalTime
in class RelativeTime
public void set(long millis, int nanos) throws IllegalArgumentException
ensure
(getMilliseconds() == millis, getNanoseconds() == nanos);
set
in class HighResolutionTime
millis
- the new value for the milliseconds.nanos
- the new value for the nanoseconds.
IllegalArgumentException
public void setFrequency(int frequency) throws ArithmeticException
frequency
- the new frequency.
ArithmeticException
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |