Show
Ignore:
Timestamp:
04/09/08 15:37:35 (9 months ago)
Author:
aturner
Message:

switch to timespec (nanosecond precision) for sleeping. OS X's AbsoluteTime?
methods are really damn accurate! refs #41

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • features/performance/src/common/rdtsc.h

    r1970 r1971  
    106106 */ 
    107107static inline void 
    108 rdtsc_sleep(const struct timeval sleep) 
     108rdtsc_sleep(const struct timespec sleep) 
    109109{ 
    110110    u_int64_t sleep_until; 
     
    115115    clicks_per_usec = clicks_per_usec > 0 ? clicks_per_usec : rdtsc_calibrate(0); 
    116116     
    117     sleep_until += clicks_per_usec * TIMEVAL_TO_MICROSEC(&sleep); 
     117    sleep_until += clicks_per_usec * TIMESPEC_TO_MICROSEC(&sleep); 
    118118     
    119119    while (now < sleep_until)