
21 Sep
2011
21 Sep
'11
2:38 p.m.
On Wed, Sep 21, 2011 at 04:27:40PM +0200, Sebastian Pfützner wrote:
On 21.09.2011 14:05, Lars Viklund wrote:
The man page for clock(3) on my system claims: * The clock() function returns an approximation of processor time used * by the program.
That doesn't seem to refer to wall time
Is this correct according to the C++ standard? I always interpreted the differences between clock()-calls as wall time in conjunction with CLOCKS_PER_SEC. This constant wouldn't make sense otherwise... (?)
CLOCKS_PER_SEC is just a conversion factor between ticks and seconds of processor time. C99 7.23.2.1/2 says: The clock function determines the processor time used. -- Lars Viklund | zao@acc.umu.se