Subj : Re: pthread_cond_timedwait problems To : comp.programming.threads From : David Schwartz Date : Sun Aug 14 2005 05:52 pm wrote in message news:1124009185.007178.164900@f14g2000cwb.googlegroups.com... > This makes sense. > > Attempting delay of 10000000 nsec (10000 usecs) > gettimeofday reported delay = 11019 usecs > Actual usec delay from timer = 10952 usecs > > Attempting delay of 20000000 nsec (20000 usecs) > gettimeofday reported delay = 21033 usecs > Actual usec delay from timer = 20963 usecs > > Attempting delay of 40000000 nsec (40000 usecs) > gettimeofday reported delay = 41298 usecs > Actual usec delay from timer = 41234 usecs > > nanosleep does not relinquish the cpu. Using it in my env causes > serious problems. The job of 'nanosleep' is to wait a particular amount of time. It may or may not relinquish the CPU. > I guess the nsec member of the timeval struct was misleading me. I > should have known better. Huh? DS .