From owner-freebsd-hackers Tue Apr 1 06:21:01 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id GAA03455 for hackers-outgoing; Tue, 1 Apr 1997 06:21:01 -0800 (PST) Received: from florence.pavilion.net (florence.pavilion.net [194.242.128.25]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id GAA03445 for ; Tue, 1 Apr 1997 06:20:55 -0800 (PST) Received: (from joe@localhost) by florence.pavilion.net (8.8.5/8.8.5) id PAA24384; Tue, 1 Apr 1997 15:19:47 +0100 (BST) Message-ID: <19970401151947.61221@pavilion.net> Date: Tue, 1 Apr 1997 15:19:47 +0100 From: Josef Karthauser To: gbeach@cybernet.com Cc: hackers@FreeBSD.ORG Subject: Re: Internal clock References: <3340C326.6150@cybernet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.64 In-Reply-To: <3340C326.6150@cybernet.com>; from Glenn Beach on Tue, Apr 01, 1997 at 09:11:18AM +0100 Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Tue, Apr 01, 1997 at 09:11:18AM +0100, Glenn Beach wrote: > I have been searching for an answer to the following question. Doug > White at questions@freebsd.org said that you may be able to help. So > here it goes: > > How can I make time measurements in increments smaller than the clock > tick? Specifically, I am running BSD on a Pentium PC which has 128 > clock ticks per second. Is there any way to improve the resolution? > I'm using gettimeofday which returns: struct timeval { long tv_sec; /* seconds since Jan. 1, 1970 */ long tv_usec; /* and microseconds */ }; I've no idea of the actual system resolution, but I assume (without checking the source code) that the kernel will provide the best resolution available to the system. BTW a question to the hackers... does anyone have any plans for adding a real-time scheduling class, aka threads under solaris? I'm writing some midi software and could really do with a real-time class thread to handle the timing subsystem. Joe -- Josef Karthauser Technical Manager Email: joe@pavilion.net Pavilion Internet plc. [Tel: +44 1273 607072 Fax: +44 1273 607073]