In Windows:
for (int i = 0; i < 100; i++)
{
Sleep(100); // Sleep 100 ms in Windows
printf(".[%d] ", i);
}
The result is a bracketed number comes out every 100ms in Windows.
In Linux:
for (int i = 0; i < 100; i++)
{
usleep(100000); // Sleep 100 ms in Linux
printf(".[%d] ", i);
}
The result is a GROUP ob bracketed number comes out every 100ms in Linux. It is running the loop, just not printing out the numbers until sleep is done. ????