Re: time output in milliseconds

From: Dan Pop (Dan.Pop_at_cern.ch)
Date: 07/05/04


Date: 5 Jul 2004 16:40:53 GMT

In <2kmv60F3nmeoU1@uni-berlin.de> "Alex Vinokur" <alexvn@big.foot.com> writes:

>"Keith Thompson" <kst-u@mib.org> wrote in message news:lnzn6ifa3u.fsf@nuthaus.mib.org...
>[snip]
>> Actually:
>>
>> The clock function returns the implementation's best approximation
>> to the processor time used by the program since the beginning of
>> an implementation-defined era related only to the program
>> invocation.
>>
>> That typically means that clock returns an estimate of the CPU time
>> used since program startup. I don't think an implementation that
>> returns the CPU time since a fixed date, or since system startup,
>> would be conforming (though I find the wording a bit vague).
>>
>[snip]
>
>How can we know when the startup time ends and the runtime begins?

Both start at the same time, as program startup is part of program
runtime.

But this is really splitting hairs, as long as the standard contains
wording like "the best approximation", which can mean anything at all.

Dan

-- 
Dan Pop
DESY Zeuthen, RZ group
Email: Dan.Pop@ifh.de


Relevant Pages

  • Re: clock()
    ... The clock function returns the implementation’s best approximation to the ... meaning is never explained in the standard. ... > related only to the program invocation." ...
    (microsoft.public.vc.language)
  • Re: speed of execution
    ... The clock function in is for timing programs ... The clock function determines the processor time used. ... approximation to the processor time used by the program ...
    (comp.lang.c)