From owner-freebsd-arch Sat Nov 18 7:25:46 2000 Delivered-To: freebsd-arch@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 1B89637B479; Sat, 18 Nov 2000 07:25:44 -0800 (PST) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.8.7/PCNet) id KAA12879; Sat, 18 Nov 2000 10:25:23 -0500 (EST) Date: Sat, 18 Nov 2000 10:25:22 -0500 (EST) From: Daniel Eischen To: Mike Smith Cc: Mark Murray , arch@FreeBSD.ORG Subject: Re: "Monotonic" counter/register call - commit candidate. In-Reply-To: <200011181356.eAIDuHF04876@mass.osd.bsdi.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, 18 Nov 2000, Mike Smith wrote: > > On a somewhat related note, I could use something to measure time > > that wasn't a system call in the threads library. Is there a way > > we can get a timer or something that was mmap'able? > > You could probably arrange for some portion of the timecounter space to > be mapped read-only into userspace. How precise does it need to be? Scheduling tick resolution or better. I would like to use it for waking up threads that are in states that timeout. The smallest resolution would be for something like pthread_cond_timedwait() which is timespec (nanosecs), but we don't need to be that resolute. Right now we use gettimeofday(). -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message