clock_t a = 0;
clock_t b = 100;
while(a<b)
{
// get current time
a = clock();
}
It seems that it is an infinite loop. Can the while loop be broken out of?
clock_t a = 0;
clock_t b = 100;
while(a<b)
{
// get current time
a = clock();
}
It seems that it is an infinite loop. Can the while loop be broken out of?
You have an infinitely recursive call to clock() (which I'm guessing is the code you posted).
Each time the method is called, the values are initialized. a
will always be less than b
and the method will be called again.