Date: Sun, 20 Jun 1999 17:50:03 -0700 (PDT) From: Bruce Evans <bde@zeta.org.au> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/12305: clock() ticks backwards Message-ID: <199906210050.RAA13010@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/12305; it has been noted by GNATS.
From: Bruce Evans <bde@zeta.org.au>
To: FreeBSD-gnats-submit@FreeBSD.ORG, marcelk@bitpit.net
Cc:
Subject: Re: kern/12305: clock() ticks backwards
Date: Mon, 21 Jun 1999 10:45:38 +1000
>>Description:
>
>Consecutive calls to clock() sometimes suggest negative elapsed time.
This is probably fixed in -current:
---
bde 1999/03/13 11:46:13 PST
Modified files:
sys/kern kern_resource.c
sys/sys resourcevar.h
Log:
Enforce monotonicity of apparent process user, system and interrupt times.
PR: 975, 10402
Revision Changes Path
1.45 +51 -22 src/sys/kern/kern_resource.c
1.13 +4 -1 src/sys/sys/resourcevar.h
---
clock() could reduce this problem by adding the user and system times.
This would also increase its precision from about 16000 usec to about
8000 usec. It discards about about 8000 usec of precision for historical
reasons. (clock_t should be double so that CLOCKS_PER_SECOND can be
10^6 or 10^9.)
Bruce
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906210050.RAA13010>
