RTI Connext Java API Version 7.1.0
|
Type for time representation. More...
Public Member Functions | |
Time_t (Time_t time) | |
Copy constructor. More... | |
Time_t (int sec, int nanosec) | |
Constructor. More... | |
Time_t () | |
Construct a new (invalid) Time_t. More... | |
boolean | is_invalid () |
boolean | is_zero () |
Check if time is zero. More... | |
Object | copy_from (Object src) |
Copy value of a data type from source. More... | |
Object | copy_from (Object src) |
Copy value of a data type from source. More... | |
Static Public Member Functions | |
static Time_t | from_micros (long micros) |
Creates a new time object from a time expressed in microseconds. More... | |
static Time_t | from_nanos (long nanos) |
Creates a new time object from a time expressed in nanoseconds. More... | |
static Time_t | from_millis (long millis) |
Creates a new time object from a time expressed in milliseconds. More... | |
static Time_t | from_seconds (int seconds) |
Creates a new time object from a time expressed in seconds. More... | |
Public Attributes | |
int | sec |
seconds More... | |
int | nanosec |
nanoseconds More... | |
Static Public Attributes | |
static final int | TIME_INVALID_SEC |
A sentinel indicating an invalid second of time. More... | |
static final int | TIME_INVALID_NSEC |
A sentinel indicating an invalid nano-second of time. More... | |
static final Time_t | TIME_INVALID |
A sentinel indicating an invalid time. More... | |
static final Time_t | TIME_MAX |
The maximum value of time. More... | |
Type for time representation.
A com.rti.dds.infrastructure.Time_t represents a moment in time.
Copy constructor.
time | The instance to copy. It must not be null. |
References Time_t.nanosec, and Time_t.sec.
Time_t | ( | int | sec, |
int | nanosec | ||
) |
Constructor.
sec | must be >=0 |
nanosec | must be >=0 and < 1000000000 |
References Time_t.nanosec, and Time_t.sec.
Time_t | ( | ) |
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.
References Time_t.TIME_INVALID_NSEC, and Time_t.TIME_INVALID_SEC.
Referenced by Time_t.copy_from(), Time_t.from_micros(), Time_t.from_millis(), Time_t.from_nanos(), and Time_t.from_seconds().
|
static |
Creates a new time object from a time expressed in microseconds.
In case of an overflow this function returns com.rti.dds.infrastructure.Time_t.TIME_MAX.
References Time_t.TIME_MAX, and Time_t.Time_t().
|
static |
Creates a new time object from a time expressed in nanoseconds.
In case of an overflow this function returns com.rti.dds.infrastructure.Time_t.TIME_MAX.
References Time_t.TIME_MAX, and Time_t.Time_t().
|
static |
Creates a new time object from a time expressed in milliseconds.
In case of an overflow this function returns com.rti.dds.infrastructure.Time_t.TIME_MAX.
References Time_t.TIME_MAX, and Time_t.Time_t().
|
static |
Creates a new time object from a time expressed in seconds.
References Time_t.Time_t().
boolean is_invalid | ( | ) |
References Time_t.nanosec, and Time_t.sec.
Referenced by DynamicDataWriter.register_instance_w_timestamp().
boolean is_zero | ( | ) |
Check if time is zero.
References Time_t.nanosec, and Time_t.sec.
Object copy_from | ( | Object | src | ) |
Copy value of a data type from source.
Copy data into this object from another. This copy is intended to be a deep copy, so that all data members (recursively) are copied (not just resetting Object references).
This operation returns the object that is copied if copy is successful.
src | <<in>> The Object which contains the data to be copied. |
NullPointerException | If src is null. |
ClassCastException | If src is not the same type as this. |
Implements Copyable.
References Time_t.Time_t().
|
static |
A sentinel indicating an invalid second of time.
Referenced by Time_t.Time_t().
|
static |
A sentinel indicating an invalid nano-second of time.
Referenced by Time_t.Time_t().
|
static |
A sentinel indicating an invalid time.
|
static |
The maximum value of time.
Referenced by Time_t.from_micros(), Time_t.from_millis(), and Time_t.from_nanos().
int sec |
seconds
Referenced by SampleInfo.copy_from(), WriteParams_t.copy_from(), DynamicDataWriter.dispose_w_timestamp(), Time_t.is_invalid(), Time_t.is_zero(), DynamicDataWriter.register_instance_w_timestamp(), Time_t.Time_t(), DynamicDataWriter.unregister_instance_w_timestamp(), DynamicDataWriter.write_w_timestamp(), and WriteParams_t.WriteParams_t().
int nanosec |
nanoseconds
[range] [0,1000000000)
Referenced by SampleInfo.copy_from(), WriteParams_t.copy_from(), DynamicDataWriter.dispose_w_timestamp(), Time_t.is_invalid(), Time_t.is_zero(), DynamicDataWriter.register_instance_w_timestamp(), Time_t.Time_t(), DynamicDataWriter.unregister_instance_w_timestamp(), DynamicDataWriter.write_w_timestamp(), and WriteParams_t.WriteParams_t().