0
How do I set a delay in commands?
Hello world, I was training my c ++ skills when the question came to me. How do I get a command to execute after a certain time? I got frustrated with searching and finding no results, I don't know if it was because I wasn't using the right words in the search, but after an hour on the web I found nothing. Until I remembered SoloLearn and here I am, I wanted to know if there is a single command that defines this waiting time and which library belongs to it. Thanks for helping me.
2 Respostas
+ 2
1-Use loops (not a good idea).
2-If I am correct, there should be <unistd.h> C header that you can use in C++. It has the sleep() function which causes delay for a specified amount of seconds.
0
about the sleep () command I had seen it, but it didn't say what the library was, thanks man.