>Thanks Paul but tried them already, SleepEx(1,1) takes a minimum of 15ms while SleepEx(0,1) takes no time at all and therefore causes 100% cpu.
>
Nick,
You have to remember that Win32 is a pre-emptive operating system. This means that Windows decides how much time each thread gets. IOW, Windows is the dog, your application is the tail, and the tail wags only when the dog says so. You simply can't get the degree of granularity you seem to need. The amount of time Sleep(1) or Sleep(0) will vary from computer to computer depending on everything from clock speed to number of threads running.
If you don't mind my making a suggestion, could you tell us in detail what and why you're trying to accomplish this.
George
Ubi caritas et amor, deus ibi est