int clock_haveCurrentTime;
int clock_nUpdates; /* The actual number of clock updates */
+static int clockInitialized = 0;
/* Initialize the clock */
void clock_Init(void) {
- static initialized = 0;
struct itimerval itimer, otimer;
- if (!initialized) {
+ if (!clockInitialized) {
itimer.it_value.tv_sec = STARTVALUE;
itimer.it_value.tv_usec = 0;
itimer.it_interval.tv_sec = 0;
fflush (stderr);
exit(1);
}
- initialized = 1;
+ clockInitialized = 1;
}
clock_UpdateTime();
}
+#ifndef KERNEL
+/* Make clock uninitialized. */
+clock_UnInit()
+{
+ clockInitialized = 0;
+}
+#endif
+
/* Compute the current time. The timer gets the current total elapsed time since startup, expressed in seconds and microseconds. This call is almost 200 usec on an APC RT */
void clock_UpdateTime()
{