|
RTI Connext Java API
Version 6.0.1
|
Type for duration representation. More...
Inherits Struct, and Externalizable.
Public Member Functions | |
| Duration_t (Duration_t duration) | |
| Copy constructor. | |
| 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) |
Public Member Functions inherited from Struct | |
| abstract boolean | equals (Object obj) |
| abstract int | hashCode () |
| String | toString () |
Static Public Member Functions | |
| static Duration_t | from_micros (long micros) |
| Creates a new duration object from a duration expressed in microseconds. | |
| static Duration_t | from_nanos (long nanos) |
| Creates a new duration object from a duration expressed in nanoseconds. | |
| static Duration_t | from_millis (long millis) |
| Creates a new duration object from a duration expressed in milliseconds. | |
| static Duration_t | from_seconds (int seconds) |
| Creates a new duration object from a duration expressed in seconds. | |
Public Attributes | |
| int | sec |
| seconds | |
| int | nanosec |
| nanoseconds | |
Static Public Attributes | |
| static final int | DURATION_ZERO_SEC |
| A zero-length second period of time. | |
| static final int | DURATION_ZERO_NSEC |
| A zero-length nano-second period of time. | |
| static final int | DURATION_INFINITE_SEC |
| An infinite second period of time. | |
| static final int | DURATION_INFINITE_NSEC |
| An infinite nano-second period of time. | |
| static final int | DURATION_AUTO_SEC |
| An auto second period of time. | |
| static final int | DURATION_AUTO_NSEC |
| An auto nano-second period of time. | |
| static final Duration_t | DURATION_ZERO |
| A zero-length period of time. | |
| static final Duration_t | DURATION_INFINITE |
| An infinite period of time. | |
| static final Duration_t | DURATION_AUTO |
| Duration is automatically assigned. | |
Additional Inherited Members | |
Protected Member Functions inherited from Struct | |
| Struct () | |
| abstract void | pull_from_nativeI (long native_status) |
| abstract void | push_to_nativeI (long native_status) |
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. |
| Duration_t | ( | int | sec, |
| int | nanosec | ||
| ) |
| sec | must be >=0 |
| nanosec | must be >=0 |
|
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.
|
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.
|
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.
|
static |
Creates a new duration object from a duration expressed in seconds.
| boolean is_zero | ( | ) |
| boolean is_infinite | ( | ) |
| boolean is_auto | ( | ) |
| Duration_t add | ( | Duration_t | other | ) |
Calculates a duration as the result of adding other and this.
Special case:
| Duration_t subtract | ( | Duration_t | other | ) |
Calculates a duration as the result of substracting other to this.
Special cases:
|
static |
A zero-length second period of time.
|
static |
A zero-length nano-second period of time.
|
static |
An infinite second period of time.
|
static |
An infinite nano-second period of time.
|
static |
An auto second period of time.
|
static |
An auto nano-second period of time.
|
static |
A zero-length period of time.
|
static |
An infinite period of time.
|
static |
Duration is automatically assigned.
| int sec |
seconds
| int nanosec |
nanoseconds