Type for time representation.
More...
Public Member Functions |
| | Time_t (Time_t time) |
| | Copy constructor.
|
| |
| | Time_t (int sec, int nanosec) |
| | Constructor.
|
| |
| | Time_t () |
| | Construct a new (invalid) Time_t.
|
| |
| boolean | is_invalid () |
| |
| boolean | is_zero () |
| | Check if time is zero.
|
| |
| abstract boolean | equals (Object obj) |
| |
| abstract int | hashCode () |
| |
| String | toString () |
| |
| Object | copy_from (Object src) |
| | Copy value of a data type from source.
|
| |
Static Public Member Functions |
| static Time_t | from_micros (long micros) |
| | Creates a new time object from a time expressed in microseconds.
|
| |
| static Time_t | from_nanos (long nanos) |
| | Creates a new time object from a time expressed in nanoseconds.
|
| |
| static Time_t | from_millis (long millis) |
| | Creates a new time object from a time expressed in milliseconds.
|
| |
| static Time_t | from_seconds (int seconds) |
| | Creates a new time object from a time expressed in seconds.
|
| |
Public Attributes |
| int | sec |
| | seconds
|
| |
| int | nanosec |
| | nanoseconds
|
| |
Additional Inherited Members |
| | Struct () |
| |
| abstract void | pull_from_nativeI (long native_status) |
| |
| abstract void | push_to_nativeI (long native_status) |
| |
Detailed Description
Type for time representation.
A com.rti.dds.infrastructure.Time_t represents a moment in time.
Constructor & Destructor Documentation
Copy constructor.
- Parameters
-
| time | The instance to copy. It must not be null. |
| Time_t |
( |
int |
sec, |
|
|
int |
nanosec |
|
) |
| |
Constructor.
- Parameters
-
| sec | must be >=0 |
| nanosec | must be >=0 |
Construct a new (invalid) Time_t.
The primary purpose of this constructor is to satisfy the java.io.Serializable interface. The resulting object will have invalid seconds and nanoseconds.
Member Function Documentation
| static Time_t from_micros |
( |
long |
micros | ) |
|
|
static |
| static Time_t from_nanos |
( |
long |
nanos | ) |
|
|
static |
| static Time_t from_millis |
( |
long |
millis | ) |
|
|
static |
| static Time_t from_seconds |
( |
int |
seconds | ) |
|
|
static |
Creates a new time object from a time expressed in seconds.
- Returns
- com.rti.dds.infrastructure.true if the given time is not valid (i.e. is negative)
Check if time is zero.
- Returns
- com.rti.dds.infrastructure.true if the given time is equal to com.rti.dds.infrastructure.Time_t.ZERO or com.rti.dds.infrastructure.false otherwise.
Member Data Documentation
| final int TIME_INVALID_SEC |
|
static |
A sentinel indicating an invalid second of time.
| final int TIME_INVALID_NSEC |
|
static |
A sentinel indicating an invalid nano-second of time.
A sentinel indicating an invalid time.
The maximum value of time.