30 #include "osapi/osapi_dll.h"
83 #define OSAPI_NTP_TIME_SEC_MAX ((RTI_INT32)0x7fffffff)
88 #define OSAPI_NTP_TIME_FRAC_MAX ((RTI_UINT32)0xffffffff)
237 #define OSAPI_NtpTime_increment(answer, time) \
239 register RTI_UINT32 currentFrac = (answer)->frac; \
240 (answer)->sec += (time)->sec; \
241 (answer)->frac += (time)->frac; \
242 if (((answer)->frac < (time)->frac) || ((answer)->frac < currentFrac)) { \
258 #define OSAPI_NtpTime_decrement(answer, time) \
260 register RTI_UINT32 currentFrac = (answer)->frac; \
261 (answer)->sec -= (time)->sec; \
262 (answer)->frac -= (time)->frac; \
263 if (((answer)->frac > currentFrac)) { (answer)->sec--; } \
275 #define OSAPI_NTP_TIME_ZERO {0,0}
283 #define OSAPI_NTP_TIME_MAX {OSAPI_NTP_TIME_SEC_MAX,OSAPI_NTP_TIME_FRAC_MAX}
289 #define OSAPI_NTP_TIME_NSEC_PER_SEC (1000000000)
295 #define OSAPI_NTP_TIME_USEC_PER_SEC (1000000)
301 #define OSAPI_NTP_TIME_MSEC_PER_SEC (1000)
307 #define OSAPI_NTP_TIME_NSEC_PER_USEC (1000)
313 #define OSAPI_NTP_TIME_USEC_PER_MSEC (1000)
319 #define OSAPI_NTP_TIME_SEC_PER_SEC (1)
325 #define OSAPI_NTP_TIME_NSEC_PER_MSEC (1000000)