The x-kernel uses a time structure that is the same as that of Unix.
typedef struct {long sec;
long usec;
} XTime;
Sets time to the current time of day.
void xGetTime(XTime *time)
Sets result to the sum of time_1 and time_2. Assumes time_1 and time_2 are in standard time format (i.e., does not check for integer overflow of the usec value).
void xAddTime(XTime *result, XTime time_1, XTime time_2)
Sets result to the difference of time_1 and time_2. The resulting value may be negative.
void xSubTime(XTime *result, XTime time_1, XTime time_2)