What is the command to have a delay between execution of functions | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is the command to have a delay between execution of functions

Having some problems with a c++ game I am making and I need this specific command, the command I want is essentially a timer

29th Feb 2020, 8:52 PM
Riley Melton
2 Answers
+ 3
Have a look at either sleep_for() or sleep_until(), which can be found inside the <thread> header: https://en.cppreference.com/w/cpp/thread/sleep_for https://en.cppreference.com/w/cpp/thread/sleep_until
29th Feb 2020, 9:02 PM
Shadow
Shadow - avatar
0
I'll check it out when I get the chance
29th Feb 2020, 9:06 PM
Riley Melton