Pausing, time, etc.

Started by
1 comment, last by Drakon 22 years, 5 months ago
How would I go about making a delay between two things? I.E. make a two second delay before the program prints a string. I''d prefer using that timeGetTime() stuff.
"Go for the eyes, Boo, go for the eyes!"
Advertisement
Well, the easiest way would be to just call
  Sleep(2000); // sleep for 2000 milliseconds (= 2 seconds)  

If you''re not worried about Locking use Sleep (as Dactylos pointed out) or use one of these (since you said you wanted timeGetTime):
  // Method 1DWORD Final = timeGetTime() + Length;while(timeGetTime() < Final);// Method 2DWORD Final = timeGetTime() + Length;while(timeGetTime() < Final) Sleep(Whatever);  


[Resist Windows XP''s Invasive Production Activation Technology!]

This topic is closed to new replies.

Advertisement