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

Time API definition. More...

Go to the source code of this file.

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_zero(time)
 Set struct OSAPI_NtpTime time to zero.
#define OSAPI_NtpTime_set_max(time)
 Set struct OSAPI_NtpTime time to maximum value.
#define OSAPI_NtpTime_from_millisec(time, s, msec)
 Macro to convert from seconds and milliseconds to struct OSAPI_NtpTime format.
#define OSAPI_NtpTime_to_millisec(s, msec, time)
 Macro to convert from struct OSAPI_NtpTime to seconds and milliseconds.
#define OSAPI_NtpTime_from_microsec(time, s, usec)
 Macro to convert from seconds and microseconds to struct OSAPI_NtpTime format.
#define OSAPI_NtpTime_to_microsec(s, usec, time)
 Macro to convert from struct OSAPI_NtpTime to seconds and microseconds.
#define OSAPI_NtpTime_from_nanosec(time, s, nsec)
 Macro to convert from seconds and nanoseconds to struct OSAPI_NtpTime format.
#define OSAPI_NtpTime_to_nanosec(s, nsec, time)
 Macro to convert from struct OSAPI_NtpTime to seconds and nanoseconds.
#define OSAPI_NTP_TIME_PRECISION_BITS_DEFAULT   7
 Precision used in bit manipulation for struct OSAPI_NtpTime fraction conversions.
#define OSAPI_NtpTime_from_fraction(time, numerator, denominator_per_sec)
 Macro to convert numerator/denom_per_sec into NTP time.
#define OSAPI_NtpTime_to_fraction(numerator, denominator_per_sec, time)
 Transforms from struct OSAPI_NtpTime to any integral fraction of a second without using floating point operations.
#define OSAPI_NtpTime_compare(time1, time2)
 Compare two OSAPI_NtpTimes.
#define OSAPI_NtpTime_is_infinite(time)
#define OSAPI_NtpTime_add(answer, t1, t2)
 answer = t1 + t2.
#define OSAPI_NtpTime_subtract(answer, t1, t2)
 answer = t1 - t2.
#define OSAPI_NtpTime_left_shift(answer, time, shift)
 answer = time << shift.
#define OSAPI_NtpTime_right_shift(answer, time, shift)
 answer = time >> shift.
#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_NtpTime_increment_infinitesimally(time)   ((++((time)->frac)) == 0) ? ++(time)->sec : 0
 time = time + 1 fraction (~200 picoseconds).
#define OSAPI_NtpTime_is_zero(time)
#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.

Detailed Description

Time API definition.


RTI Connext Micro Version 2.4.1.0 Copyright © Thu Nov 20 2014 Real-Time Innovations, Inc