1 #include "timefn.h" 2 3 unsigned long GetClicks(void) { 4 unsigned long now; 5 #ifdef NO_GETTOD 6 struct tms dummy; 7 now = (unsigned long) times(&dummy); 8 #else 9 struct timeval date; 10 struct timezone tz; 11 gettimeofday(&date, &tz); 12 now = date.tv_sec*1000000 + date.tv_usec; 13 #endif 14 return now; 15 } |