Subject: Re: sysconf _SC_CLK_TCK bug?
To: Ben Harris <bjh21@netbsd.org>
From: Perry E. Metzger <perry@wasabisystems.com>
List: tech-userlevel
Date: 06/17/2002 11:42:39
Ben Harris <bjh21@netbsd.org> writes:
> > Actually, according to the documents, it returns things in the fully
> > unrelated CLOCKS_PER_SEC unit.
> 
> Are you sure?

Read the time.h thing on the opengroup web site, and the text for
times. You haven't quite got the whole picture I think.

> <http://www.opengroup.org/onlinepubs/007904975/functions/times.html> says:
> #   All times are measured in terms of the number of clock ticks used.
> and in the APPLICATION USAGE (informative):
> #   Applications should use sysconf(_SC_CLK_TCK) to determine the number of
> #   clock ticks per second as it may vary from system to system.
> 
> Nowhere does it mention CLOCKS_PER_SEC.  The normative text in 1003.1-1996
> is identical, and times(3) agrees.

Ignore 1996. This seems to have changed a lot.

> OK.  I wasn't sure that the old one could be considered to be
> comprehensively dead just yet.

The new one was voted in.

--
Perry E. Metzger		perry@wasabisystems.com
--
NetBSD: The right OS for your embedded design. http://www.wasabisystems.com/