The website of Lei Chen

Sunshine and rain of a developer

How to use C++ Sleep() function under Windows

Posted by hide1713 on May 28, 2009

If you want to sleep 1 second in your program, you should do the following thing

1. #include <windows.h>

2. DWORD dwMillseconds=1000;

3. Sleep(doMillseconds);

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.