From owner-freebsd-hackers Wed Nov 5 12:46:39 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA06903 for hackers-outgoing; Wed, 5 Nov 1997 12:46:39 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from srv.net (snake.srv.net [199.104.81.3]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id MAA06891 for ; Wed, 5 Nov 1997 12:46:35 -0800 (PST) (envelope-from cmott@srv.net) Received: from darkstar.home (dialin1.anlw.anl.gov [141.221.254.101]) by srv.net (8.8.5/8.8.5) with SMTP id NAA17907 for ; Wed, 5 Nov 1997 13:46:30 -0700 (MST) Date: Wed, 5 Nov 1997 13:45:57 -0700 (MST) From: Charles Mott X-Sender: cmott@darkstar.home To: hackers@hub.freebsd.org Subject: Re: gettimeofday() overhead Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Wed, 5 Nov 1997, Tony Overfield wrote: > >On Tue, 4 Nov 1997, Mike Smith wrote: > > > >Unfortunately, this requires access to /dev/kmem, and thus your process > >must be running as root. IMHO this isn't really an acceptable tradeoff > >unless the application already requires it. > > What about a /dev/timeofday device that allowed you to read-only map > only the appropriate clock bits (or equiv.)? > This sounds like a good idea. Quite a few programs need event-based timestamps, and if gettimeofday() in the standard library could access /dev/timeofday without a user-kernel context switch, this would seem to be a performance enhancement to the system. Charles Mott