0

How to make time pass before loop executes again

In c++ is there any way to make loop wait until executing again. For example: while(condision) { code *wait funcion or something*}

18th Dec 2018, 5:58 PM
0_Effort
0_Effort - avatar
3 Respostas
+ 2
Note: you will not see any effect in the playground as the output appears in full after the program completes it's running on a remote server. It is likely that this will cause your program to hit the timeout limit and get aborted. You only get a little server time to run.
18th Dec 2018, 6:26 PM
John Wells
John Wells - avatar
+ 1
#include <unistd.h> usleep(microseconds);
18th Dec 2018, 6:21 PM
Matúš Semančík
Matúš Semančík - avatar
0
Thank you!
18th Dec 2018, 6:27 PM
0_Effort
0_Effort - avatar