/* * Stop timing and return real time in microseconds. */ uint64 stop(struct timeval *begin, struct timeval *end) { if (end == NULL) { end = &stop_tv; } (void) gettimeofday(end, (struct timezone *) 0); if (begin == NULL) { begin = &start_tv; } return tvdelta(begin, end); }
/* * Stop timing and return real time in microseconds. */ uint64 stop(struct timeval *begin, struct timeval *end) { if (end == NULL) { end = &stop_tv; } (void) gettimeofday(end, (struct timezone *) 0); #ifdef RUSAGE getrusage(RUSAGE_SELF, &ru_stop); #endif if (begin == NULL) { begin = &start_tv; } return (tvdelta(begin, end)); }
uint64 gettime(void) { return (tvdelta(&start_tv, &stop_tv)); }