public class RationalTime extends RelativeTime
| Constructor and Description |
|---|
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
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
RationalTime |
set(long millis,
int nanos)
Deprecated.
Sets the value of the
frequency field. |
void |
setFrequency(int frequency)
Deprecated.
RTSJ V1.0.1 class RationalTime is deprecated
|
absolute, add, add, add, add, compareToZero, negate, negate, relative, relative, scale, scale, subtract, subtract, toStringclone, compareTo, equals, equals, getClock, getMilliseconds, getNanoseconds, hashCode, set, set, waitForObjectpublic RationalTime(int frequency)
throws IllegalArgumentException
IllegalArgumentException - iff frequency is negative.frequency - the frequency.public RationalTime(int frequency,
long millis,
int nanos)
throws IllegalArgumentException
IllegalArgumentException - iff any argument is negative or
the frequency is 0.frequency - the frequency.millis - milliseconds of base interval.nanos - nanoseconds of base interval.public RationalTime(int frequency,
RelativeTime interval)
throws IllegalArgumentException
IllegalArgumentException - iff frequency is negative or
the base interval is null.frequency - the frequency.interval - the base interval.public AbsoluteTime absolute(Clock clock, AbsoluteTime destination)
absolute in class RelativeTimeArithmeticException - if the resulting absolute time could
not be represented by an instance of AbsoluteTime.clock - The clock, null to use Clock.getRealtimeClock().destination - the destination absolute time object.public void addInterarrivalTo(AbsoluteTime destination)
addInterarrivalTo in class RelativeTimedestination - public int getFrequency()
public RelativeTime getInterarrivalTime(RelativeTime dest)
getInterarrivalTime in class RelativeTimedest - 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 RelativeTimepublic RationalTime set(long millis, int nanos) throws IllegalArgumentException
frequency field.set in class HighResolutionTime<RelativeTime>StaticIllegalArgumentException - when there is an overflow in the
millisecond component while normalizing.
result of parameter normalization.IllegalArgumentExceptionmillis - The new value for the millisecond field.nanos - The new value for the nanosecond field.thispublic void setFrequency(int frequency)
throws ArithmeticException
ArithmeticExceptionfrequency - the new frequency.aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2019 aicas GmbH. All Rights Reserved.