RTI Connext Java API  Version 5.1.0
Time_t Class Reference

Type for time representation. More...

Inheritance diagram for Time_t:
Copyable

Public Member Functions

 Time_t (Time_t time)
 Copy constructor.
 
 Time_t (int sec, int nanosec)
 Constructor.
 
boolean is_invalid ()
 
boolean is_zero ()
 Check if time is zero.
 
- Public Member Functions inherited from Struct
abstract boolean equals (Object obj)
 
abstract int hashCode ()
 
String toString ()
 
- Public Member Functions inherited from Copyable
Object copy_from (Object src)
 Copy value of a data type from source.
 

Static Public Member Functions

static Time_t from_micros (long micros)
 
static Time_t from_nanos (long nanos)
 
static Time_t from_millis (long millis)
 
static Time_t from_seconds (long seconds)
 

Public Attributes

int sec
 seconds
 
int nanosec
 nanoseconds
 

Static Public Attributes

static final int TIME_INVALID_SEC
 A sentinel indicating an invalid second of time.
 
static final int TIME_INVALID_NSEC
 A sentinel indicating an invalid nano-second of time.
 
static final Time_t TIME_INVALID
 A sentinel indicating an invalid time.
 

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)
 

Detailed Description

Type for time representation.

A com.rti.dds.infrastructure.Time_t represents a moment in time.

Constructor & Destructor Documentation

Time_t ( Time_t  time)

Copy constructor.

Parameters
timeThe instance to copy. It must not be null.
Time_t ( int  sec,
int  nanosec 
)

Constructor.

Parameters
secmust be >=0
nanosecmust be >=0

Member Function Documentation

static Time_t from_micros ( long  micros)
static

Creates a new time object from a time expressed in nanoseconds

static Time_t from_nanos ( long  nanos)
static

Creates a new time object from a time expressed in nanoseconds

static Time_t from_millis ( long  millis)
static

Creates a new time object from a time expressed in milliseconds

static Time_t from_seconds ( long  seconds)
static

Creates a new time object from a time expressed in seconds

boolean is_invalid ( )
Returns
com.rti.dds.infrastructure.true if the given time is not valid (i.e. is negative)
boolean is_zero ( )

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.

final Time_t TIME_INVALID
static

A sentinel indicating an invalid time.

int sec

seconds

int nanosec

nanoseconds


RTI Connext Java API Version 5.1.0 Copyright © Mon Feb 3 2014 Real-Time Innovations, Inc