Changeset 1976
- Timestamp:
- 04/13/08 22:33:49 (7 months ago)
- Files:
-
- 1 modified
-
features/performance/src/common/timer.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
features/performance/src/common/timer.h
r1974 r1976 224 224 gettimeofday(&now, NULL); 225 225 if (!timerisset(&last)) { 226 timeradd(&last, &now, &last);227 226 timesclear(ret); 228 227 } else { 229 228 timersub(&now, &last, &delta); 230 last.tv_sec = now.tv_sec;231 last.tv_nsec = now.tv_nsec;232 229 TIMEVAL_TO_TIMESPEC(&delta, ret); 233 230 } 231 last.tv_sec = now.tv_sec; 232 last.tv_nsec = now.tv_nsec; 234 233 #endif 235 234 }
