RTI Connext Java API Version 7.3.0
|
Type for duration representation. More...
Inherits Struct, and Externalizable.
Public Member Functions | |
Duration_t (Duration_t duration) | |
Copy constructor. More... | |
Duration_t (int sec, int nanosec) | |
boolean | is_zero () |
boolean | is_infinite () |
boolean | is_auto () |
Duration_t | add (Duration_t other) |
Duration_t | subtract (Duration_t other) |
Static Public Member Functions | |
static Duration_t | from_micros (long micros) |
Creates a new duration object from a duration expressed in microseconds. More... | |
static Duration_t | from_nanos (long nanos) |
Creates a new duration object from a duration expressed in nanoseconds. More... | |
static Duration_t | from_millis (long millis) |
Creates a new duration object from a duration expressed in milliseconds. More... | |
static Duration_t | from_seconds (int seconds) |
Creates a new duration object from a duration expressed in seconds. More... | |
Public Attributes | |
int | sec |
seconds More... | |
int | nanosec |
nanoseconds More... | |
Static Public Attributes | |
static final int | DURATION_ZERO_SEC |
A zero-length second period of time. More... | |
static final int | DURATION_ZERO_NSEC |
A zero-length nano-second period of time. More... | |
static final int | DURATION_INFINITE_SEC |
An infinite second period of time. More... | |
static final int | DURATION_INFINITE_NSEC |
An infinite nano-second period of time. More... | |
static final int | DURATION_AUTO_SEC |
An auto second period of time. More... | |
static final int | DURATION_AUTO_NSEC |
An auto nano-second period of time. More... | |
static final Duration_t | DURATION_ZERO |
A zero-length period of time. More... | |
static final Duration_t | DURATION_INFINITE |
An infinite period of time. More... | |
static final Duration_t | DURATION_AUTO |
Duration is automatically assigned. More... | |
Type for duration representation.
Represents a time interval.
Duration_t | ( | Duration_t | duration | ) |
Copy constructor.
duration | The duration instance to copy. It must not be null. |
References Duration_t.nanosec, and Duration_t.sec.
Duration_t | ( | int | sec, |
int | nanosec | ||
) |
sec | must be >=0 |
nanosec | must be >=0 and < 1000000000 |
References Duration_t.nanosec, and Duration_t.sec.
|
static |
Creates a new duration object from a duration expressed in microseconds.
In case of an overflow this function returns com.rti.dds.infrastructure.Duration_t.DURATION_INFINITE.
References Duration_t.DURATION_INFINITE.
|
static |
Creates a new duration object from a duration expressed in nanoseconds.
In case of an overflow this function returns com.rti.dds.infrastructure.Duration_t.DURATION_INFINITE.
References Duration_t.DURATION_INFINITE.
|
static |
Creates a new duration object from a duration expressed in milliseconds.
In case of an overflow this function returns com.rti.dds.infrastructure.Duration_t.DURATION_INFINITE.
References Duration_t.DURATION_INFINITE.
|
static |
Creates a new duration object from a duration expressed in seconds.
boolean is_zero | ( | ) |
References Duration_t.nanosec, and Duration_t.sec.
boolean is_infinite | ( | ) |
References Duration_t.DURATION_INFINITE_NSEC, Duration_t.DURATION_INFINITE_SEC, Duration_t.nanosec, and Duration_t.sec.
Referenced by Duration_t.add(), and Duration_t.subtract().
boolean is_auto | ( | ) |
References Duration_t.DURATION_AUTO_NSEC, Duration_t.DURATION_AUTO_SEC, Duration_t.nanosec, and Duration_t.sec.
Duration_t add | ( | Duration_t | other | ) |
Calculates a duration as the result of adding other and this.
Special case:
References Duration_t.DURATION_INFINITE, Duration_t.DURATION_INFINITE_SEC, Duration_t.is_infinite(), Duration_t.nanosec, and Duration_t.sec.
Duration_t subtract | ( | Duration_t | other | ) |
Calculates a duration as the result of substracting other to this.
Special cases:
References Duration_t.DURATION_ZERO, Duration_t.is_infinite(), Duration_t.nanosec, and Duration_t.sec.
|
static |
A zero-length second period of time.
|
static |
A zero-length nano-second period of time.
|
static |
An infinite second period of time.
Referenced by Duration_t.add(), and Duration_t.is_infinite().
|
static |
An infinite nano-second period of time.
Referenced by Duration_t.is_infinite().
|
static |
An auto second period of time.
Referenced by Duration_t.is_auto().
|
static |
An auto nano-second period of time.
Referenced by Duration_t.is_auto().
|
static |
A zero-length period of time.
Referenced by Duration_t.subtract().
|
static |
An infinite period of time.
Referenced by Duration_t.add(), Duration_t.from_micros(), Duration_t.from_millis(), and Duration_t.from_nanos().
|
static |
Duration is automatically assigned.
int sec |
seconds
Referenced by Duration_t.add(), Duration_t.Duration_t(), Duration_t.is_auto(), Duration_t.is_infinite(), Duration_t.is_zero(), Duration_t.subtract(), and WaitSet.wait().
int nanosec |
nanoseconds
[range] [0,1000000000)
Referenced by Duration_t.add(), Duration_t.Duration_t(), Duration_t.is_auto(), Duration_t.is_infinite(), Duration_t.is_zero(), Duration_t.subtract(), and WaitSet.wait().