Mail Archives: djgpp/1994/11/08/08:48:47
> The reason why we can use clock() at up to 1.19 MHz is because the
> hardware keeps track of it for us. All we have to do is *calculate*
> the return value of clock() when it's called. We don't actually have
> to get interrupted on each tic.
For those out there who are talking about nanosecond resolution
it is worth remembering that the DJGPP implementation of clock()
isn't exactly what it is supposed to be, i.e. a measure of
*consumed CPU time by the program*.
Running the program inside a Windows DOS box makes things even worse.
------------------------- K&R, 2nd, p.255 ----------------------------------
clock_t clock(void)
clock returns the processor time used by the program since the
beginning of execution, or -1 if unavailable.
Pieter Kunst (kunst AT prl DOT philips DOT nl)
- Raw text -