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. |
RelativeTime |
set(RelativeTime time)
Deprecated.
Changes the value represented by
this to that of the given
time. |
void |
setFrequency(int frequency)
Deprecated.
RTSJ V1.0.1 class RationalTime is deprecated
|
java.lang.String |
toString()
Deprecated.
toString returns this interval as a string of the form "(<milli>
ms, <nano> ns)".
|
absolute, absolute, absolute, add, add, add, add, apportion, apportion, compareToZero, multiply, negate, negate, relative, relative, relative, relative, scale, scale, subtract, subtractclone, compareTo, equals, equals, getChronograph, getClock, getMilliseconds, getNanoseconds, hashCode, set, set, waitForObjectpublic RationalTime(int frequency)
throws java.lang.IllegalArgumentException
frequency - the frequency.java.lang.IllegalArgumentException - iff frequency is negative.public RationalTime(int frequency,
long millis,
int nanos)
throws java.lang.IllegalArgumentException
frequency - the frequency.millis - milliseconds of base interval.nanos - nanoseconds of base interval.java.lang.IllegalArgumentException - iff any argument is negative or
the frequency is 0.public RationalTime(int frequency,
RelativeTime interval)
throws java.lang.IllegalArgumentException
frequency - the frequency.interval - the base interval.java.lang.IllegalArgumentException - iff frequency is negative or
the base interval is null.public AbsoluteTime absolute(Clock clock, AbsoluteTime destination)
absolute in class RelativeTimeclock - The clock, null to use Clock.getRealtimeClock().destination - the destination absolute time object.java.lang.ArithmeticException - if the resulting absolute time could
not be represented by an instance of AbsoluteTime.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 RelativeTime set(RelativeTime time)
this to that of the given
time. The Chronograph associated with this
is set to be the Chronograph associated with the time parameter.set in class HighResolutionTime<RelativeTime>time - The new value of thisthisjava.lang.ClassCastException - when the type of this and the
type of the parameter time are
not the same.StaticIllegalArgumentException - when the parameter time
is null.public RationalTime set(long millis, int nanos) throws java.lang.IllegalArgumentException
frequency field.set in class HighResolutionTime<RelativeTime>millis - The new value for the millisecond field.nanos - The new value for the nanosecond field.thisStaticIllegalArgumentException - when there is an overflow in the
millisecond component while normalizing.
result of parameter normalization.java.lang.IllegalArgumentExceptionpublic void setFrequency(int frequency)
throws java.lang.ArithmeticException
frequency - the new frequency.java.lang.ArithmeticExceptionpublic java.lang.String toString()
toString in class RelativeTimeaicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2024 aicas GmbH. All Rights Reserved.