|
-
January 6th, 2009, 12:22 PM
#21
Re: while loop w/ sleep(1) doesnt work
I guess what I am saying is that Windows is not an RTOS #1 and #2 that not every version of Windows will provide what you need if you are using a thread. Windows XP will not be able to create a thread that reliably polls at the rate of 1ms. Windows Vista may be able to do this *more* reliably for you since it has been enchanced for multi-media purposes.
Windows XP has a 10 ms quantum.
Windiws Vista has 1 ms.
As a side note, Windows 9X and Me have 55ms quantum.
I have had speedier results with SetTimer than with threads.
There are those who believe that sleep() with a parameter of > 0 is evil.
eg: http://www.flounder.com/time.htm
Last edited by ahoodin; January 6th, 2009 at 12:26 PM.
ahoodin
To keep the plot moving, that's why.

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|