Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. unsigned int sleep(unsigned int seconds);
  2.  
  3. DESCRIPTION
  4. sleep() makes the calling thread sleep until
  5. seconds seconds have elapsed or a signal arrives which is not ignored.
  6.  
  7. unsigned int time_to_sleep = 10; // sleep 10 seconds
  8. while(time_to_sleep)
  9. time_to_sleep = sleep(time_to_sleep);
  10.  
  11. while( true )
  12. {
  13. // your stuff
  14. sleep( 10 ); // sleeping for 10 seconds
  15. };
  16.  
  17. #include <unistd.h>
  18. sleep(10); // 10 seconds
  19.  
  20. #include <windows.h>
  21. Sleep(10000); // 10 seconds (10000 milliseconds)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement