When I compile and run this code (it's part of a much larger program), Linux gets halfway through the while
loop, then simply stops working.
The code below prints time: 0
and then hangs, doing nothing else until I suspend the process. Why on earth would it print time: 0
but not the following line of sanity check?
while (i < 5)
{
printf("time: %d\n",elapsedTime);
printf("sanity check");
foo();
i++;
}