Click here to Skip to main content
15,913,685 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: deprecated functions Pin
Waldermort13-Feb-07 13:11
Waldermort13-Feb-07 13:11 
QuestionGetting text under the cursor Pin
RandyS13-Feb-07 12:00
RandyS13-Feb-07 12:00 
AnswerRe: Getting text under the cursor Pin
Christian Graus13-Feb-07 12:13
protectorChristian Graus13-Feb-07 12:13 
GeneralRe: Getting text under the cursor Pin
RandyS14-Feb-07 3:11
RandyS14-Feb-07 3:11 
GeneralRe: Getting text under the cursor Pin
Mark Salsbery14-Feb-07 6:43
Mark Salsbery14-Feb-07 6:43 
GeneralRe: Getting text under the cursor Pin
Christian Graus14-Feb-07 9:27
protectorChristian Graus14-Feb-07 9:27 
QuestionDisableProcessWindowsGhosting in C++? Pin
Debs*13-Feb-07 11:40
Debs*13-Feb-07 11:40 
QuestionSleep() issues Pin
pblais13-Feb-07 10:17
pblais13-Feb-07 10:17 
Hi...
If there is a better way to do what I am doing, I'll jump on it.

I am using Sleep(milliseconds) in my code to place strategic waits for time to pass. As an example, I need to stop the application because I know that something going on in the real world will take at least 100 msecs to finish and I don't have anyway to handshake with this device/application. So I put a Sleep(100). This has worked ok until recently when I tried running my app in one of the newer PCs with the real fast processor etc.
Now my Sleep()'s are too short.
Is there a way to figure out what the Sleep() will be in msecs from one PC to another?

Also... what is the accuracy of, let's say, Sleep(20). How close to waiting 20 msecs will that be?

Like I said earlier, if there is a better and more accurate way to do this the using Sleep(), I am open to all suggestions...


Regards and thank you in advance
Pierre


AnswerRe: Sleep() issues Pin
Christian Graus13-Feb-07 10:36
protectorChristian Graus13-Feb-07 10:36 
AnswerRe: Sleep() issues Pin
Ravi Bhavnani13-Feb-07 10:42
professionalRavi Bhavnani13-Feb-07 10:42 
AnswerRe: Sleep() issues Pin
Mark Salsbery13-Feb-07 10:48
Mark Salsbery13-Feb-07 10:48 
GeneralRe: Sleep() issues Pin
pblais14-Feb-07 3:00
pblais14-Feb-07 3:00 
GeneralRe: Sleep() issues Pin
Mark Salsbery14-Feb-07 6:05
Mark Salsbery14-Feb-07 6:05 
GeneralRe: Sleep() issues Pin
pblais15-Feb-07 2:37
pblais15-Feb-07 2:37 
AnswerRe: Sleep() issues Pin
Stephen Hewitt13-Feb-07 10:58
Stephen Hewitt13-Feb-07 10:58 
AnswerRe: Sleep() issues Pin
led mike13-Feb-07 11:19
led mike13-Feb-07 11:19 
GeneralRe: Sleep() issues Pin
Mark Salsbery13-Feb-07 11:27
Mark Salsbery13-Feb-07 11:27 
GeneralRe: Sleep() issues Pin
pblais14-Feb-07 3:01
pblais14-Feb-07 3:01 
GeneralRe: Sleep() issues Pin
led mike14-Feb-07 4:13
led mike14-Feb-07 4:13 
GeneralRe: Sleep() issues Pin
Mark Salsbery14-Feb-07 6:06
Mark Salsbery14-Feb-07 6:06 
GeneralRe: Sleep() issues Pin
led mike14-Feb-07 6:49
led mike14-Feb-07 6:49 
GeneralRe: Sleep() issues Pin
Mark Salsbery14-Feb-07 7:03
Mark Salsbery14-Feb-07 7:03 
AnswerRe: Sleep() issues Pin
Michael Dunn13-Feb-07 14:31
sitebuilderMichael Dunn13-Feb-07 14:31 
QuestionQuestion about VC++ resource files Pin
KellyR13-Feb-07 10:01
KellyR13-Feb-07 10:01 
AnswerRe: Question about VC++ resource files Pin
Mark Salsbery13-Feb-07 10:11
Mark Salsbery13-Feb-07 10:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.