From owner-freebsd-questions@FreeBSD.ORG Fri Apr 4 14:45:10 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 088A11065670 for ; Fri, 4 Apr 2008 14:45:10 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from be-well.ilk.org (dsl092-078-145.bos1.dsl.speakeasy.net [66.92.78.145]) by mx1.freebsd.org (Postfix) with ESMTP id D00878FC0A for ; Fri, 4 Apr 2008 14:45:09 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: by be-well.ilk.org (Postfix, from userid 1147) id 1E4682846A; Fri, 4 Apr 2008 10:45:07 -0400 (EDT) To: =?windows-1252?Q?Viktor_=8Atujber?= References: <890fa77e0804021036v7ac31f70p91806679c1061709@mail.gmail.com> From: Lowell Gilbert Date: Fri, 04 Apr 2008 10:45:07 -0400 In-Reply-To: <890fa77e0804021036v7ac31f70p91806679c1061709@mail.gmail.com> ("Viktor =?windows-1252?Q?=8Atujber=22's?= message of "Wed\, 2 Apr 2008 19\:36\:42 +0200") Message-ID: <443aq1y8zw.fsf@be-well.ilk.org> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Cc: freebsd-questions@freebsd.org Subject: Re: need confirmation of documentation problem for times(3) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Apr 2008 14:45:10 -0000 "Viktor =8Atujber" writes: > I have been forwarded to this list from a docs bugreport > * http://www.freebsd.org/cgi/query-pr.cgi?pr=3D122359 > and I am looking for confirmation of this issue. > > Transscript: >> The freebsd manpages for 'clock_t times(struct tms *tp)' say the followi= ng: >> >> The times() function returns the value of time in CLK_TCK's of a second = since >> 0 hours, 0 minutes, 0 seconds, January 1, 1970, Coordinated Universal Ti= me. >> But after letting a sample C program print the returned value, it matches >> the system's uptime (in clock ticks). >> >> I would like to ask the bsd devs to clarify whether this is >> a documentation problem, or an implementation problem. According to /usr/src/lib/libc/gen/times.c (and my understanding of the way it uses clock_gettime()), it looks like the documentation matches what the code is intended to do. If there is a problem, it is probably in clock_gettime().=20=20 Note that times(2) is a deprecated function, and *either* behaviour is acceptable according to the standards which applied before it was deprecated.