Sleep for a bit after printing file progress to reduce CPU usage

This commit is contained in:
L. Bradley LaBoon 2020-03-24 17:01:48 -04:00
parent b7c052b39a
commit ee8c693f3b
1 changed files with 1 additions and 0 deletions

View File

@ -284,6 +284,7 @@ void copyNew(char *src, int srcPrefix, char *dest, int destPrefix, int testMode)
printf("\b \b");
numPrinted = printf("%.2lf%%", pDone * 100);
fflush(stdout);
usleep(50000);
}
}
for (int i = 0; i < numPrinted; i++)