Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Nov 1996 01:50:03 -0800 (PST)
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-bugs
Subject:   Re: misc/1998: clock() wraps after only 548775 ticks
Message-ID:  <199611130950.BAA05385@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/1998; it has been noted by GNATS.

From: Bruce Evans <bde@zeta.org.au>
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 <time.h>. 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



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