+ 1
Function sleep()
How can I use the function sleep() from<time.h>to slow down the code below. Can anyone help me to fix it out? Thanks so much https://code.sololearn.com/cNBgj98LESYu/#c
3 Respuestas
+ 4
On SoloLearn, you will hit the timeout limit using sleep. Not to mention, it won't change anything as your output is only displayed after the program finishes.
If your running it on your laptop, I'd put a sleep at the beginning of printPosition.
+ 2
...
void printPosition( const int* const tortoisePtr, const int* const harePtr ){
sleep(1); // wait 1 second
int i;
...
0
how can i put the sleep fuction at printPosition?