home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.18 / text0054.txt < prev    next >
Encoding:
Internet Message Format  |  1990-03-18  |  1.4 KB

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