Interaction between for loops with clock function?!
- by learningtolive
Can someone explain me the exact interaction in context of delay between the two for loops with clock function. How does for1 interact with for2 on the cout statement(30 on 640000000)?
start=clock();
cout<<endl<<start<<endl;
for(delay=0; delay<30; delay++)
for(i=0; i<640000000; i++);
end=clock();
cout<<end<<endl;
cout<<"Num of ticks for non reg-loop: ";
cout<<end-start<<'\n';