Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Apr 2001 14:57:57 -0700
From:      Mike Smith <msmith@freebsd.org>
To:        Terry Lambert <tlambert@primenet.com>
Cc:        neugebar@dcs.gla.ac.uk (Rolf Neugebauer), freebsd-alpha@FreeBSD.ORG
Subject:   Re: determine cycle counter frequency in user space 
Message-ID:  <200104302157.f3ULvvv02259@mass.dis.org>
In-Reply-To: Your message of "Mon, 30 Apr 2001 21:47:48 -0000." <200104302147.OAA12404@usr01.primenet.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 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




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