View Single Post
Old May 1st, 2002   #8 (permalink)
krz
Registered User
 
Join Date: Oct 2001
Posts: 10
gettimeofday() has microsecond resolution, so I don't think the problem is timer resolution.

After looking at the code, you might be better off determining how much time to wait, and calling usleep (instead of a busy wait loop). gettimeofday is a syscall, so there is a fair amount of overhead when calling that in a loop. Just a thought/suggestion.
krz is offline