RTI Connext DDS Micro C API  Version 3.0.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
osapi_time.h File Reference

Time API definition. More...

#include "osapi/osapi_dll.h"
#include "osapi/osapi_types.h"

Data Structures

struct  OSAPI_NtpTime
 NtpTime API. More...

Macros

#define OSAPI_NTP_TIME_SEC_MAX   ((RTI_INT32)0x7fffffff)
#define OSAPI_NTP_TIME_FRAC_MAX   ((RTI_UINT32)0xffffffff)
#define OSAPI_NtpTime_increment(answer, time)
 answer += time.
#define OSAPI_NtpTime_decrement(answer, time)
 Decrement one struct OSAPI_NtpTime value by another struct OSAPI_NtpTime value.
#define OSAPI_NTP_TIME_ZERO   {0,0}
 Zero time.
#define OSAPI_NTP_TIME_MAX   {OSAPI_NTP_TIME_SEC_MAX,OSAPI_NTP_TIME_FRAC_MAX}
#define OSAPI_NTP_TIME_NSEC_PER_SEC   (1000000000)
#define OSAPI_NTP_TIME_USEC_PER_SEC   (1000000)
#define OSAPI_NTP_TIME_MSEC_PER_SEC   (1000)
#define OSAPI_NTP_TIME_NSEC_PER_USEC   (1000)
#define OSAPI_NTP_TIME_USEC_PER_MSEC   (1000)
#define OSAPI_NTP_TIME_SEC_PER_SEC   (1)
#define OSAPI_NTP_TIME_NSEC_PER_MSEC   (1000000)

Typedefs

typedef struct OSAPI_NtpTime OSAPI_NtpTime
 NtpTime API.

Functions

void OSAPI_NtpTime_from_millisec (struct OSAPI_NtpTime *const time, RTI_INT32 s, RTI_UINT32 msec)
 Macro to convert from seconds and milliseconds to struct OSAPI_NtpTime format.
void OSAPI_NtpTime_to_millisec (RTI_INT32 *const s, RTI_UINT32 *const msec, const struct OSAPI_NtpTime *const time)
 Macro to convert from struct OSAPI_NtpTime to seconds and milliseconds.
void OSAPI_NtpTime_from_microsec (struct OSAPI_NtpTime *const time, RTI_INT32 s, RTI_UINT32 usec)
 Macro to convert from seconds and microseconds to struct OSAPI_NtpTime format.
void OSAPI_NtpTime_to_microsec (RTI_INT32 *const s, RTI_UINT32 *const usec, const struct OSAPI_NtpTime *const time)
 Macro to convert from struct OSAPI_NtpTime to seconds and microseconds.
void OSAPI_NtpTime_from_nanosec (struct OSAPI_NtpTime *const time, RTI_INT32 s, RTI_UINT32 nsec)
 Macro to convert from seconds and nanoseconds to struct OSAPI_NtpTime format.
void OSAPI_NtpTime_to_nanosec (RTI_INT32 *const s, RTI_UINT32 *const nsec, const struct OSAPI_NtpTime *const time)
 Macro to convert from struct OSAPI_NtpTime to seconds and nanoseconds.
RTI_BOOL OSAPI_NtpTime_is_infinite (const struct OSAPI_NtpTime *const time)
void OSAPI_NtpTime_subtract (struct OSAPI_NtpTime *const answer, const struct OSAPI_NtpTime *const t1, const struct OSAPI_NtpTime *const t2)
 answer = t1 - t2.
RTI_INT32 OSAPI_NtpTime_compare (const struct OSAPI_NtpTime *time1, const struct OSAPI_NtpTime *time2)
 Compare two NTP structures.

Detailed Description

Time API definition.

This file implements function to convert between the NtpTime format and other formats.


RTI Connext DDS Micro C API Version 3.0.1 Copyright © Thu Oct 24 2019 Real-Time Innovations, Inc