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)
212 OSAPIDllExport RTI_BOOL
239 OSAPIDllExport RTI_INT32
252 #define OSAPI_NtpTime_increment(answer, time) \
254 register RTI_UINT32 currentFrac = (answer)->frac; \
255 (answer)->sec += (time)->sec; \
256 (answer)->frac += (time)->frac; \
257 if (((answer)->frac < (time)->frac) || ((answer)->frac < currentFrac)) { \
273 #define OSAPI_NtpTime_decrement(answer, time) \
275 register RTI_UINT32 currentFrac = (answer)->frac; \
276 (answer)->sec -= (time)->sec; \
277 (answer)->frac -= (time)->frac; \
278 if (((answer)->frac > currentFrac)) { (answer)->sec--; } \
290 #define OSAPI_NTP_TIME_ZERO {0,0}
298 #define OSAPI_NTP_TIME_MAX {OSAPI_NTP_TIME_SEC_MAX,OSAPI_NTP_TIME_FRAC_MAX}
304 #define OSAPI_NTP_TIME_NSEC_PER_SEC (1000000000)
310 #define OSAPI_NTP_TIME_USEC_PER_SEC (1000000)
316 #define OSAPI_NTP_TIME_MSEC_PER_SEC (1000)
322 #define OSAPI_NTP_TIME_NSEC_PER_USEC (1000)
328 #define OSAPI_NTP_TIME_USEC_PER_MSEC (1000)
334 #define OSAPI_NTP_TIME_SEC_PER_SEC (1)
340 #define OSAPI_NTP_TIME_NSEC_PER_MSEC (1000000)