Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 04 Apr 2008 10:45:07 -0400
From:      Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
To:        =?windows-1252?Q?Viktor_=8Atujber?= <viktor.stujber@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: need confirmation of documentation problem for times(3)
Message-ID:  <443aq1y8zw.fsf@be-well.ilk.org>
In-Reply-To: <890fa77e0804021036v7ac31f70p91806679c1061709@mail.gmail.com> ("Viktor =?windows-1252?Q?=8Atujber=22's?= message of "Wed\, 2 Apr 2008 19\:36\:42 %2B0200")
References:  <890fa77e0804021036v7ac31f70p91806679c1061709@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
"Viktor =8Atujber" <viktor.stujber@gmail.com> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?443aq1y8zw.fsf>