RTI Connext Micro C API Version 4.2.0
Loading...
Searching...
No Matches

Time and duration types and defines. More...

Data Structures

struct  DDS_Time_t
 Type for time representation. More...
 
struct  DDS_Duration_t
 Type for duration representation. More...
 

Macros

#define DDS_TIME_ZERO
 The default instant in time: zero seconds and zero nanoseconds.
 

Functions

DDS_Boolean DDS_Time_greater_than (const struct DDS_Time_t *l, const struct DDS_Time_t *r)
 
DDS_Boolean DDS_Time_is_zero (const struct DDS_Time_t *time)
 Check if time is zero.
 
DDSCDllExport DDS_Boolean DDS_Duration_is_infinite (const struct DDS_Duration_t *duration)
 
DDSCDllExport int DDS_Duration_compare (const struct DDS_Duration_t *left, const struct DDS_Duration_t *right)
 
DDSCDllExport DDS_Boolean DDS_Duration_equal (const struct DDS_Duration_t *self, const struct DDS_Duration_t *other)
 
DDSCDllExport DDS_Boolean DDS_Duration_is_zero (const struct DDS_Duration_t *duration)
 

Variables

DDSCDllVariable const DDS_Long DDS_TIME_INVALID_SEC
 A sentinel indicating an invalid second of time.
 
DDSCDllVariable const DDS_UnsignedLong DDS_TIME_INVALID_NSEC
 A sentinel indicating an invalid nano-second of time.
 
DDSCDllVariable const struct DDS_Time_t DDS_TIME_INVALID
 A sentinel indicating an invalid time.
 
DDSCDllVariable const DDS_Long DDS_DURATION_INFINITE_SEC
 An infinite second period of time.
 
DDSCDllVariable const DDS_UnsignedLong DDS_DURATION_INFINITE_NSEC
 An infinite nano-second period of time.
 
DDSCDllVariable const struct DDS_Duration_t DDS_DURATION_INFINITE
 An infinite period of time.
 
DDSCDllVariable const DDS_Long DDS_DURATION_ZERO_SEC
 A zero-length second period of time.
 
DDSCDllVariable const DDS_UnsignedLong DDS_DURATION_ZERO_NSEC
 A zero-length nano-second period of time.
 
DDSCDllVariable const struct DDS_Duration_t DDS_DURATION_ZERO
 A zero-length period of time.
 

Detailed Description

Time and duration types and defines.

Macro Definition Documentation

◆ DDS_TIME_ZERO

#define DDS_TIME_ZERO

The default instant in time: zero seconds and zero nanoseconds.

Function Documentation

◆ DDS_Time_greater_than()

DDS_Boolean DDS_Time_greater_than ( const struct DDS_Time_t * l,
const struct DDS_Time_t * r )
Returns
DDS_BOOLEAN_TRUE if the first time is greater than the second.

◆ DDS_Time_is_zero()

DDS_Boolean DDS_Time_is_zero ( const struct DDS_Time_t * time)

Check if time is zero.

Returns
DDS_BOOLEAN_TRUE if the given time is equal to DDS_TIME_ZERO or DDS_BOOLEAN_FALSE otherwise.

References DDS_TIME_INVALID, DDS_TIME_INVALID_NSEC, and DDS_TIME_INVALID_SEC.

◆ DDS_Duration_is_infinite()

DDSCDllExport DDS_Boolean DDS_Duration_is_infinite ( const struct DDS_Duration_t * duration)
Returns
DDS_BOOLEAN_TRUE if the given duration is of infinite length.

◆ DDS_Duration_compare()

DDSCDllExport int DDS_Duration_compare ( const struct DDS_Duration_t * left,
const struct DDS_Duration_t * right )
Parameters
left<<in>> Duration to compare. Cannot be NULL.
right<<in>> Duration to compare. Cannot be NULL.
Returns
If the two durations are equal, the function returns 0. If left is greater than right the function returns a positive number; otherwise, it returns a negative number.

References RTI_INT32, and RTI_UINT32.

◆ DDS_Duration_equal()

DDSCDllExport DDS_Boolean DDS_Duration_equal ( const struct DDS_Duration_t * self,
const struct DDS_Duration_t * other )
Parameters
self<<in>> Duration to compare. Cannot be NULL.
other<<in>> Duration to be compared to this one. Cannot be NULL.
Returns
DDS_BOOLEAN_TRUE if the two objects contain the same value, DDS_BOOLEAN_FALSE otherwise.

References DDS_DURATION_ZERO, DDS_DURATION_ZERO_NSEC, and DDS_DURATION_ZERO_SEC.

◆ DDS_Duration_is_zero()

DDSCDllExport DDS_Boolean DDS_Duration_is_zero ( const struct DDS_Duration_t * duration)
Returns
DDS_BOOLEAN_TRUE if the given duration is of zero length.

Variable Documentation

◆ DDS_TIME_INVALID_SEC

DDSCDllVariable const DDS_Long DDS_TIME_INVALID_SEC
extern

A sentinel indicating an invalid second of time.

Referenced by DDS_Time_is_zero().

◆ DDS_TIME_INVALID_NSEC

DDSCDllVariable const DDS_UnsignedLong DDS_TIME_INVALID_NSEC
extern

A sentinel indicating an invalid nano-second of time.

Referenced by DDS_Time_is_zero().

◆ DDS_TIME_INVALID

DDSCDllVariable const struct DDS_Time_t DDS_TIME_INVALID
extern

A sentinel indicating an invalid time.

Referenced by DDS_Time_is_zero().

◆ DDS_DURATION_INFINITE_SEC

DDSCDllVariable const DDS_Long DDS_DURATION_INFINITE_SEC
extern

An infinite second period of time.

◆ DDS_DURATION_INFINITE_NSEC

DDSCDllVariable const DDS_UnsignedLong DDS_DURATION_INFINITE_NSEC
extern

An infinite nano-second period of time.

◆ DDS_DURATION_INFINITE

DDSCDllVariable const struct DDS_Duration_t DDS_DURATION_INFINITE
extern

An infinite period of time.

◆ DDS_DURATION_ZERO_SEC

DDSCDllVariable const DDS_Long DDS_DURATION_ZERO_SEC
extern

A zero-length second period of time.

Referenced by DDS_Duration_equal().

◆ DDS_DURATION_ZERO_NSEC

DDSCDllVariable const DDS_UnsignedLong DDS_DURATION_ZERO_NSEC
extern

A zero-length nano-second period of time.

Referenced by DDS_Duration_equal().

◆ DDS_DURATION_ZERO

DDSCDllVariable const struct DDS_Duration_t DDS_DURATION_ZERO
extern

A zero-length period of time.

Referenced by DDS_Duration_equal().