[Aldor-l] patch: obsolete POSIX name for CLOCKS_PER_SEC

Bill Page bill.page at newsynthesis.org
Fri Aug 24 08:04:03 EDT 2007


Steven,

On 8/24/07, you wrote:
> Thank you Bill.
>
> Do you believe that we should use CLOCKS_PER_SEC pervasively instead?
>

Unfortunately the answer is "no". You can find a lot of comments like
this on the web:

"Here the standards are faulty: CLK_TCK is obsoleted by CLOCKS_PER_SEC,
but CLOCKS_PER_SEC is required to be fixed at the value of 1000000L,
so on many architectures it _differs_ from CLK_TCK !
clock() and times() both have clock_t as a return type, but the former
returns a value measured according to CLOCKS_PER_SEC, the latter
according to CLK_TCK, and this is clearly absurd."

The patch that I proposed is a common solution but it is not
universal. This is probably a very good example of the desirability of
converting Aldor to use a standard tool like autoconf where these sort
of inconsistencies are addressed for the greatest number of
architectures. I would should consider this patch as just "the best we
can do" until we have this more general solution.

In autoconf this is related to the macro AC_HEADER_TIME.

Regards,
Bill Page.



More information about the Aldor-l mailing list