> I didn't have a problem on my machine with resolution - it supported 1ms
> for both calls (you can test this by taking the average over a number of
> iterations). I think the overhead you were seeing is your Visual FoxPro
> code, not a limitation with the DLL calls. In that case (as you've found),
> Fabio's solution is probably the best for you.
> -Paul
Paul, try this and let me know what you get. Then change to sleep(0).
I wonder if the resolution of sleep depends on the OS I am using Win2k.
DECLARE Sleep IN WIN32API INTEGER nMillisecs
t1=SECONDS()
nItems=1000
FOR k=1 TO nItems
Sleep(1)
NEXT
? 1000*(SECONDS()-t1)/nItems,"ms"