[uClibc]Re: CLK_TCK fair well messed up
Miles Bader
miles at lsi.nec.co.jp
Thu Jul 11 01:19:57 UTC 2002
mjn3 at codepoet.org (Manuel Novoa III) writes:
> In an effort to minimize codesize, I implemented clock() to deal with the
> currently possible values of CLK_TCK and left an #error test in to flag a
> problem if the situation changes. In fact, I think it is better to leave
> the #error test in place for unsupported values, rather than attempt to do
> a canned solution that might introduce more integer arithemtic error
> than necessary.
In what cases is the code gcc produces for the `simple' calculation
(ticks * (CLOCKS_PER_SEC / CLK_TCK)) unreasonable? [sorry, I'd like to
check the existing special case code so that I can ask a more informed
question, but the fileserver where my uclibc source is stored is
currently down!]
It seems kind of silly to require that all possible CLK_TCK values be
explicitly listed in the code.
-Miles
--
.Numeric stability is probably not all that important when you're guessing.
More information about the uClibc
mailing list