flush console to ensure progress output
This commit is contained in:
parent
247a66cad1
commit
a258b4bbea
7
main.c
7
main.c
|
@ -28,11 +28,16 @@ int main() {
|
||||||
while (getchar() != '\n');
|
while (getchar() != '\n');
|
||||||
|
|
||||||
printf("please wait");
|
printf("please wait");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
unsigned long long int* wtf = (unsigned long long int*) malloc(size);
|
unsigned long long int* wtf = (unsigned long long int*) malloc(size);
|
||||||
|
|
||||||
for (unsigned long long int i = 0; i < size / sizeof(long long int); i++) {
|
for (unsigned long long int i = 0; i < size / sizeof(long long int); i++) {
|
||||||
wtf[i] = 0x80085;
|
wtf[i] = 0x80085;
|
||||||
if (i > 0 && i % (1024 * 1024 * 1024 / sizeof(long long int)) == 0) printf(".");
|
if (i > 0 && i % (1024 * 1024 * 1024 / sizeof(long long int)) == 0) {
|
||||||
|
printf(".");
|
||||||
|
fflush(stdout);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue