Date: Sun, 20 Jun 1999 15:52:29 +0200 (CEST) From: marcelk@bitpit.net To: FreeBSD-gnats-submit@freebsd.org Subject: kern/12305: clock() ticks backwards Message-ID: <199906201352.PAA53936@brick.bitpit.net>
next in thread | raw e-mail | index | archive | help
>Number: 12305
>Category: kern
>Synopsis: clock() ticks backwards
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Jun 20 07:00:02 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator: Marcel van Kervinck
>Release: FreeBSD 3.2-BETA i386
>Organization:
>Environment:
Observed in releases 2.2, 3.1 and 3.2, SMP and non-SMP kernels.
>Description:
Consecutive calls to clock() sometimes suggest negative elapsed time.
>How-To-Repeat:
#include <time.h>
#include <stdio.h>
int main (void)
{
clock_t a, b;
for (;;) {
b = clock ();
do {
a = b;
b = clock ();
} while (a <= b);
printf ("%lu %lu\n", (unsigned long)a, (unsigned long)b);
}
return 0;
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
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?199906201352.PAA53936>
