Mail Archives: djgpp/1994/11/08/05:59:30
> Perhaps we should set CLOCKS_PER_SEC (or whatever) to 1193046 ?
In my judgement, only if clock_t is going to be long long (64-bit).
It isn't reasonable, even if allowed by ANSI, for the program
elapsed time to overflow after about 40 minutes. Most programs
which use clock(), especially on a PC, won't suspect such a
a disaster. I bumped into it while helping a friend to compile
a chess-playing program, which relies on clock() to count time
left for the players' moves. You can imagine what happens when
it started getting negative times...
- Raw text -