home *** CD-ROM | disk | FTP | other *** search
- From: Doug Gwyn <gwyn@smoke.brl.mil>
-
- In article <542@longway.TIC.COM> alexande@drivax.uucp (Mark Alexander) writes:
- >I can't find CLK_TCK anywhere in the Dec 7, 1988 draft of ANSI C.
- >There *is* something called CLOCKS_PER_SEC, which seems like the right thing.
- >Did the name get changed at some point? Which name is correct?
-
- CLK_TCK is correct, but as you note it turned out to not be part of ANSI C.
- POSIX implementations should define it in the shared (between POSIX and ANSI C)
- header <time.h>, under control of _POSIX_SOURCE (so that it is not visible in
- pure ANSI C mode).
-
- Several drafts of X3.159 had used CLK_TCK incorrectly where CLOCKS_PER_SEC is
- now used. CLK_TCK really originated with the /usr/group 1984 Standard and was
- intended for the sort of use that 1003.1-1988 assigns for it, not for the sort
- of use that X3.159-1989 assigns for CLOCKS_PER_SEC. This was realized in the
- final stages of preparation of X3.159, after 1003.1 had already finished their
- standard.
-
- I suppose as acting 1003.1/X3J11 liaison I owe an apology for not having
- noticed this problem before it was too late for 1003.1 to fix it in their
- document. However, by following my recommendation above the damage is limited
- to 1003.1 inaccurately stating that CLK_TCK is defined by ANSI C whereas in
- fact it is defined by 1003.1 (through its use and mention in 1003.1-1988).
-
- Volume-Number: Volume 18, Number 55
-
-