/* * timer.c * * Summary: Used for internal timing. */ #if defined(LINUX) #include #include #elif defined(SUN) #include #else #include #endif #include "timer.h" double time_of_day(void) { struct timeval tm; struct timezone tz; gettimeofday(&tm, &tz); return((double)(tm.tv_sec) + (double)(tm.tv_usec)/1000000.0); }