What is the easiest way to do a timer ?
-
I am currently developing a MFC dialog based application and i need a function----- void Pause(int time) such that Pause(3); will stop a loop(or rather the whole application) for 3 seconds...Pause(n) will stop a loop for n seconds..etc. What is the easiest way to write such a function(preferebly without #including any libraries) ? I have been experimenting with some of the syntax without much success...Can some kind soul please put me out of my misery and tell me how to do it ? Thanks :)
-
I am currently developing a MFC dialog based application and i need a function----- void Pause(int time) such that Pause(3); will stop a loop(or rather the whole application) for 3 seconds...Pause(n) will stop a loop for n seconds..etc. What is the easiest way to write such a function(preferebly without #including any libraries) ? I have been experimenting with some of the syntax without much success...Can some kind soul please put me out of my misery and tell me how to do it ? Thanks :)
-
-
What I do is set up a timer to interupt every second, and then count the interupts. When you have got to your required count, you can the go off and do the functionality that you want to do Mike
-
I am currently developing a MFC dialog based application and i need a function----- void Pause(int time) such that Pause(3); will stop a loop(or rather the whole application) for 3 seconds...Pause(n) will stop a loop for n seconds..etc. What is the easiest way to write such a function(preferebly without #including any libraries) ? I have been experimenting with some of the syntax without much success...Can some kind soul please put me out of my misery and tell me how to do it ? Thanks :)
WM_TIMER This is a very easy thing to use, but is not 100% accurate. You will need SetTimer and KillTimer