>I am trying to delay a loop by a small amount of time.
>
>If I use sleep(1) it delays for a minimum of 16ms, much too slow. If instead I use Sleep(0) the loop happens quick enough but also have 100% cpu usage.
>
>Anyone know of another way to place a delay in a loop, something inbetween sleep(0) and sleep(1).
>
You could try:
DECLARE INTEGER SleepEx IN WIN32API ;
INTEGER, ;
INTEGER
SleepEx(1, 0)
SleepEx(0, 0)