From owner-freebsd-alpha Mon Apr 30 14:53:22 2001 Delivered-To: freebsd-alpha@freebsd.org Received: from mass.dis.org (mass.dis.org [216.240.45.41]) by hub.freebsd.org (Postfix) with ESMTP id 724F237B43C for ; Mon, 30 Apr 2001 14:53:15 -0700 (PDT) (envelope-from msmith@mass.dis.org) Received: from mass.dis.org (localhost [127.0.0.1]) by mass.dis.org (8.11.3/8.11.3) with ESMTP id f3ULvvv02259; Mon, 30 Apr 2001 14:57:57 -0700 (PDT) (envelope-from msmith@mass.dis.org) Message-Id: <200104302157.f3ULvvv02259@mass.dis.org> X-Mailer: exmh version 2.1.1 10/15/1999 To: Terry Lambert Cc: neugebar@dcs.gla.ac.uk (Rolf Neugebauer), freebsd-alpha@FreeBSD.ORG Subject: Re: determine cycle counter frequency in user space In-reply-to: Your message of "Mon, 30 Apr 2001 21:47:48 -0000." <200104302147.OAA12404@usr01.primenet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 30 Apr 2001 14:57:57 -0700 From: Mike Smith Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > I am personally not very happy at all with what has happened to > the clock code; what used to be a direct reference to "curtime" > is now a convoluted mess requiring a dead chicken and some pagan > incantations to achieve the same thing, at the same time making > gettimeofday() inordinately expensive. Use time_second for coarse timing requirements. > It also bothers me that the standard system clock doesn't use the > cycle counter, and instead is rn of the i8254 interrupt, which > bothers me no end. The cycle counter can't be relied on. Get this through your thick head. The clock frequency on many Alpha systems is unstable, and on most PCs, it can change out from under you with no warning. > If you could get a baseline and a frequency in user space, it would > be very easy to implement gettimeofday() in user space, if things > were not so strange. Hardware sucks; what can I say? You can't do this usefully in userspace; stop trying and go buy some real timing hardware if you actually care. -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] V I C T O R Y N O T V E N G E A N C E To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message