RTI Connext Micro  Version 2.4.4.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
OSAPI_NtpTime Struct Reference

NtpTime API. More...

#include <osapi_time.h>


Detailed Description

NtpTime API.

NTP Time representation.

Expresses time in NTP format. The second field is simply an integer expressing seconds. The fraction field expresses 1/2^32 of a second. We strongly urge customers to use our provided macros to convert this format to and from human readable form.

OSAPI_NtpTime_init must be called before OSAPI_NtpTime_get. Creating a domain has the side-effect of calling OSAPI_NtpTime_init.

Example:

The following is a simple example on how to prepare a struct OSAPI_NtpTime structure to be 1.5 seconds.

     struct OSAPI_NtpTime ntpTime;

     OSAPI_NtpTime_packFromMillisec(ntpTime, 1, 500);
See also:
OSAPI_NtpTime_packFromMillisec OSAPI_NtpTime_packFromMicrosec
OSAPI_NtpTime_packFromNanosec
OSAPI_NtpTime_unpackFromMillisec OSAPI_NtpTime_unpackFromMicrosec
OSAPI_NtpTime_unpackFromNanosec

RTI Connext Micro Version 2.4.4.0 Copyright © Thu Apr 30 2015 Real-Time Innovations, Inc