next up previous contents index
Next: Panic Conditions Up: Utility Routines Previous: Storage

Time

 

The x-kernel uses a time structure that is the same as that of Unix.

 
		typedef struct {

long sec;

long usec;

} XTime;

xGetTime

 

Sets time to the current time of day.

void xGetTime(XTime *time)

xAddTime

 

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)

xSubTime

 

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)



Larry Peterson
Tue Jul 1 14:50:34 MST 1997