Content-type: text/html
typedef unsigned long long RTClockCount;
typedef unsigned long RTClockMicroSecs;
RTClockCount RTClock_ReadClockCounter();
char *RTClock_Micro_ctime_r(struct timeval *tv, char *buf);
struct timeval *RTClock_GetTimeOfDay(struct timeval *tv, struct timezone *tz);
struct timeval *RTClock_GetTimeOfDay_ClockCount(struct timeval *tv, RTClockCount ticks);
void RTClock_SetBaseTimeOfDay(struct timeval *tv);
void RTClock_GetBaseTimeOfDay(struct timeval *tv);
void RTClock_Sync(RTClockCount *now, struct timeval *tv);
RTClockMicroSecs RTClockCount_to_RTClockMicroSecs(RTClockCount ticks);
RTClockCount RTClockMicroSecs_to_RTClockClock(RTClockMicroSecs usec);
RTClock_GetTimeOfDay and RTClock_GetTimeOfDay_ClockCount return an RTClockCount based time of day. RTClock_GetTimeOfDay implicitly reads the RTClockCount whereas RTClock_GetTimeOfDay_ClockCount uses the supplied ticks parameter. RTClock_GetBaseTimeOfDay, RTClock_SetBaseTimeOfDay and RTClock_Sync are used to get/set the base time epoch which is initialized early in Chronolytix system init. These are used to synchronized to external clocks or to adjust drift from another timebase such as gettimeofday(2). RTClockCount_to_RTClockMicroSecs and RTClockMicroSecs_to_RTClockClock are conversion routines for manipulating the two Chronolytix time bases.
RTClock is a Chronolytix core function.