I know the POSIX sleep(x)
function makes the program sleep for x seconds. Is there a function to make the program sleep for x milliseconds in C++?
相关问题
- Sorting 3 numbers without branching [closed]
- How to compile C++ code in GDB?
- Why does const allow implicit conversion of refere
- thread_local variables initialization
- What uses more memory in c++? An 2 ints or 2 funct
Syntax:
Usage:
Depending on your platform you may have
usleep
ornanosleep
available.usleep
is deprecated and has been deleted from the most recent POSIX standard;nanosleep
is preferred.