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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

C++ wait.....

  • 11-03-2005 11:16pm
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 Posts: 885 ✭✭✭clearz


    Sleep(time in ms);


  • Registered Users, Registered Users 2 Posts: 868 ✭✭✭DonalN


    many thanks...


  • Registered Users, Registered Users 2 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, Registered Users 2 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, Registered Users 2 Posts: 885 ✭✭✭clearz


    think its windows.h


Advertisement