Sleep function in C++

后端 未结 7 1513
情书的邮戳
情书的邮戳 2020-11-27 03:27

Is there a function like Sleep(time); that pauses the program for X milliseconds, but in C++?

Which header should I add and what is the function\'s sign

相关标签:
7条回答
  • 2020-11-27 03:51

    Prior to C++11, there was no portable way to do this.

    A portable way is to use Boost or Ace library. There is ACE_OS::sleep(); in ACE.

    0 讨论(0)
提交回复
热议问题