Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unsigned int sleep(unsigned int seconds);
- DESCRIPTION
- sleep() makes the calling thread sleep until
- seconds seconds have elapsed or a signal arrives which is not ignored.
- unsigned int time_to_sleep = 10; // sleep 10 seconds
- while(time_to_sleep)
- time_to_sleep = sleep(time_to_sleep);
- while( true )
- {
- // your stuff
- sleep( 10 ); // sleeping for 10 seconds
- };
- #include <unistd.h>
- sleep(10); // 10 seconds
- #include <windows.h>
- Sleep(10000); // 10 seconds (10000 milliseconds)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement