Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!rutgers!cs.utexas.edu!longway!std-unix From: std-unix@longway.TIC.COM (Moderator, John S. Quarterman) Newsgroups: comp.std.unix Subject: Re: CLK_TCK vs. CLOCKS_PER_SEC Message-ID: <321@longway.TIC.COM> Date: 20 Mar 89 16:04:13 GMT References: <320@longway.TIC.COM> Reply-To: uunet!hpfcdc.HP.COM!hp-sdd!donn (Donn Terry) Organization: HP Ft. Collins, Co. Lines: 26 Approved: jsq@longway.tic.com (Moderator, John S. Quarterman) Newsgroups: comp.std.unix From: uunet!hpfcdc.HP.COM!hp-sdd!donn (Donn Terry) CLK_TCK is usually known as HZ (which is typically 50, 60, or 100). CLOCKS_PER_SEC is used for clock() and is typically in microseconds. For a while they were both the same, which would be a problem, obviously. The committees didn't detect the problem until quite late in the cycle. Both ANSI C and POSIX are having to change as a result. The CLOCKS_PER_SEC name change was easy for X3J11; the corresponding changes in POSIX will be harder because of its status as a published standard and because it is built on ANSI C in part. Drafts of those changes exist, but have not been approved in any way. For now: sysconf() will always give the "right" answer for CLK_TCK, so use that. I'm speaking only for myself in this. Donn Terry Chair 1003.1 Volume-Number: Volume 16, Number 20