From owner-freebsd-bugs Wed Nov 13 01:50:06 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id BAA05391 for bugs-outgoing; Wed, 13 Nov 1996 01:50:06 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id BAA05385; Wed, 13 Nov 1996 01:50:03 -0800 (PST) Date: Wed, 13 Nov 1996 01:50:03 -0800 (PST) Message-Id: <199611130950.BAA05385@freefall.freebsd.org> To: freebsd-bugs Cc: From: Bruce Evans Subject: Re: misc/1998: clock() wraps after only 548775 ticks Reply-To: Bruce Evans Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR misc/1998; it has been noted by GNATS. From: Bruce Evans To: FreeBSD-gnats-submit@FreeBSD.org, Schweikhardt@RUS.Uni-Stuttgart.DE Cc: schweikh@diamant.noc.dfn.de Subject: Re: misc/1998: clock() wraps after only 548775 ticks Date: Wed, 13 Nov 1996 20:38:41 +1100 >>Synopsis: clock() wraps after only 548775 ticks This was fixed 13 months ago in -current and 4 months ago in -stable. It was reported in PR 788. > The value returned by clock() wraps after about 548775 ticks > (4288 CPU seconds = 1 hour and then some). > This is the behaviour I would expect if CLOCKS_PER_SEC were 1000000, > but it's only 128 according to . So FreeBSD needlessly wastes > a great potential of accurate resource usage measurement. This Using clock() needlessly wastes a factor of 1000000/128 of precision. This can't be fixed until clock_t is larger so that CLOCKS_PER_SECOND can be 10^6 or more. Bruce