Re: clock()
From: Victor Bazarov (v.Abazarov_at_comAcast.net)
Date: 07/08/04
- Next message: Igor Tandetnik: "Re: How to convert Format Outlook mail Received Time?"
- Previous message: Carl Daniel [VC++ MVP]: "Re: clock()"
- In reply to: Carl Daniel [VC++ MVP]: "Re: clock()"
- Next in thread: Alexander Grigoriev: "Re: clock()"
- Reply: Alexander Grigoriev: "Re: clock()"
- Reply: J. J. Farrell: "Re: clock()"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 08 Jul 2004 10:19:44 -0400
Carl Daniel [VC++ MVP] wrote:
> Victor Bazarov wrote:
>
>
>>I wonder whether Microsoft people know about the 'clock' problem...
>
>
> ... since clock() is apparently behaving exactly the way the MSDN
> documentation says it behaves, I'd guess that they know about it, yes.
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_clock.asp
>
> "Return Value
>
> The elapsed wall-clock time since the start of the process (elapsed time in
> seconds times CLOCKS_PER_SEC). If the amount of elapsed time is unavailable,
> the function returns -1, cast as a clock_t.
> "
But I've not seen it listed in the Standard [non-]Compliance section.
IMO it should be. The Standard states that 'clock' should return
"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." (emphasis mine). It is rather
apparent that it's not the _best_ approximation, wouldn't you say?
So, my statement should rather have been "I wonder whether Microsoft
people recognise the 'clock' behaviour as non-standard", which I guess
they don't because the documentation states "ANSI" in "Compatibility"
section.
V
- Next message: Igor Tandetnik: "Re: How to convert Format Outlook mail Received Time?"
- Previous message: Carl Daniel [VC++ MVP]: "Re: clock()"
- In reply to: Carl Daniel [VC++ MVP]: "Re: clock()"
- Next in thread: Alexander Grigoriev: "Re: clock()"
- Reply: Alexander Grigoriev: "Re: clock()"
- Reply: J. J. Farrell: "Re: clock()"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|