Sleep for a bit after printing file progress to reduce CPU usage
This commit is contained in:
parent
b7c052b39a
commit
ee8c693f3b
1
backly.c
1
backly.c
@ -284,6 +284,7 @@ void copyNew(char *src, int srcPrefix, char *dest, int destPrefix, int testMode)
|
|||||||
printf("\b \b");
|
printf("\b \b");
|
||||||
numPrinted = printf("%.2lf%%", pDone * 100);
|
numPrinted = printf("%.2lf%%", pDone * 100);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
usleep(50000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i = 0; i < numPrinted; i++)
|
for (int i = 0; i < numPrinted; i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user