How do you add a timed delay to a C++ program?

后端 未结 14 2143
情话喂你
情话喂你 2020-11-28 02:11

I am trying to add a timed delay in a C++ program, and was wondering if anyone has any suggestions on what I can try or information I can look at?

I wish I had more

14条回答
  •  难免孤独
    2020-11-28 02:19

    Syntax:

    void sleep(unsigned seconds);

    sleep() suspends execution for an interval (seconds). With a call to sleep, the current program is suspended from execution for the number of seconds specified by the argument seconds. The interval is accurate only to the nearest hundredth of a second or to the accuracy of the operating system clock, whichever is less accurate.

提交回复
热议问题