Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

C++ wait.....

Options
  • 12-03-2005 12:16am
    #1
    Registered Users Posts: 868 ✭✭✭


    Hi..

    Can anyone tell me what's the line of code used to tell a program to 'wait' for a given number of secs before continuing ...
    Can't find it in the help..

    Basic q I know...novice here..

    Thanks...


Comments

  • Registered Users Posts: 885 ✭✭✭clearz


    Sleep(time in ms);


  • Registered Users Posts: 868 ✭✭✭DonalN


    many thanks...


  • Registered Users Posts: 3,695 ✭✭✭galwaydude18


    iv used "delay" to waste up processor time in my c++ labs in college this year! It works well! you can delay for what ever amount of time you want.


  • Registered Users Posts: 4,003 ✭✭✭rsynnott


    Careful; there's no standard way to do this. In POSIX-compliant OSs (Linux, MacOSX etc.) for instance, sleep takes input in SECONDS, not milliseconds.


  • Closed Accounts Posts: 1,061 ✭✭✭dawballz


    what header file do i need for sleep() ?


  • Advertisement
  • Registered Users Posts: 885 ✭✭✭clearz


    think its windows.h


Advertisement