"On a 32bit system where CLOCKS_PER_SEC equals 1000000 this function will return the same value approximately every 72 minutes."
How could this return the same value, if clock is the number of clock ticks elapsed since program execution. Wouldn't the number of clock ticks continue to grow, and as such, when we divide by 1000000, the return value should continue to grow. So how does this function return same value every 72 minutes?
Imagine scoreboard where two decimal digits can be displayed.
Question: when score is 99 and you score 1 more point, what will be displayed?
Same goes for variables in C. It has maximum value and can not hold values larger than that. C standard describes overflow behavior. In our scoreboard example it is 99 + 1 = 00.
So clock will eventually loop on itself. On a 32bit system where CLOCKS_PER_SEC equals 1000000 full cycle takes about 72 minutes.