You might also try a select(0, NULL, NULL, NULL, timeout) where timeout is set to 15ms

Hmmm.. Now those results are interesting. I can't test that on my empeg right now at work, but on my i686 Linux box at home, a select seems to give me results that are a lot closer than using nanosleep. I'll have to try that out once I get home.

This begs the question why select() would have a more accurate timeout mechanism than nanosleep()...
_________________________
- Tony C
my empeg stuff