aicas logoJamaica 6.4 release 1

javax.realtime
Class RationalTime

java.lang.Object
  extended by javax.realtime.HighResolutionTime
      extended by javax.realtime.RelativeTime
          extended by javax.realtime.RationalTime
All Implemented Interfaces:
Cloneable, Comparable<Object>

Deprecated. RTSJ V1.0.1 class RationalTime is deprecated

public class RationalTime
extends RelativeTime

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

RationalTime

public RationalTime(int frequency)
Deprecated. RTSJ V1.0.1 class RationalTime is deprecated

Constructor to create a rational time with the given frequency per second. Equivalent to RationalTime(frequency, 1000, 0);

Parameters:
frequency - the frequency.
Throws:
IllegalArgumentException - iff frequency is negative.

RationalTime

public RationalTime(int frequency,
                    long millis,
                    int nanos)
             throws IllegalArgumentException
Deprecated. RTSJ V1.0.1 class RationalTime is deprecated

Constructor to create an instance of RationalTime with the given frequency per given base interval.

Parameters:
frequency - the frequency.
millis - milliseconds of base interval.
nanos - nanoseconds of base interval.
Throws:
IllegalArgumentException - iff any argument is negative or the frequency is 0.

RationalTime

public RationalTime(int frequency,
                    RelativeTime interval)
             throws IllegalArgumentException
Deprecated. RTSJ V1.0.1 class RationalTime is deprecated

Constructor for a rational time with the given frequency and base interval.

Parameters:
frequency - the frequency.
interval - the base interval.
Throws:
IllegalArgumentException - iff frequency is negative or the base interval is null.
Method Detail

absolute

public AbsoluteTime absolute(Clock clock,
                             AbsoluteTime destination)
Deprecated. RTSJ V1.0.1 class RationalTime is deprecated

absolute converts this rational time into an instance of absolute time for the point in time given by the current time of the given clock.

Overrides:
absolute in class RelativeTime
Parameters:
clock - The clock, null to use Clock.getRealtimeClock().
destination - the destination absolute time object.
Returns:
destination or a new absolute time object.
Throws:
ArithmeticException - if the resulting absolute time could not be represented by an instance of AbsoluteTime.

addInterarrivalTo

public void addInterarrivalTo(AbsoluteTime destination)
Deprecated. RTSJ V1.0.1 this method is only required to support the deprecated RationalTime.

addInterarrivalTo adds this to the given absolute time.

Overrides:
addInterarrivalTo in class RelativeTime
Parameters:
destination -

getFrequency

public int getFrequency()
Deprecated. RTSJ V1.0.1 class RationalTime is deprecated

getFrequency returns the frequency per base interval.

Returns:
the frequency.

getInterarrivalTime

public RelativeTime getInterarrivalTime(RelativeTime dest)
Deprecated. RTSJ V1.0.1 this method is only required to support the deprecated RationalTime.

getInterarrivalTime returns the interval defined by this. If this is RationalTime, this is the interval divided by the frequency.

Overrides:
getInterarrivalTime in class RelativeTime
Parameters:
dest - The preallocated RelativeTime object to hold the result. May be null to indicate that a new object should be allocated.
Returns:
dest if dest!= null, else a newly allocated instance.

getInterarrivalTime

public RelativeTime getInterarrivalTime()
Deprecated. RTSJ V1.0.1 this method is only required to support the deprecated RationalTime.

getInterarrivalTime returns the interval defined by this. If this is RationalTime, this is the interval divided by the frequency.

Overrides:
getInterarrivalTime in class RelativeTime
Returns:
a newly allocated instance of RelativeTime.

set

public void set(long millis,
                int nanos)
         throws IllegalArgumentException
Deprecated. 
set sets the milliseconds and nanoseconds value of this object to millis and nanos.

ensure

   (getMilliseconds() == millis,
    getNanoseconds() == nanos);
 

Overrides:
set in class HighResolutionTime
Parameters:
millis - the new value for the milliseconds.
nanos - the new value for the nanoseconds.
Throws:
IllegalArgumentException

setFrequency

public void setFrequency(int frequency)
                  throws ArithmeticException
Deprecated. RTSJ V1.0.1 class RationalTime is deprecated

setFrequency sets the frequency to the gien value.

Parameters:
frequency - the new frequency.
Throws:
ArithmeticException

aicas logoJamaica 6.4 release 1

aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2015 aicas GmbH. All Rights Reserved.