Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sleep(1) too slow
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00916333
Message ID:
00916576
Views:
10
> 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"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform