From owner-freebsd-current Mon Aug 30 17:10:56 1999 Delivered-To: freebsd-current@freebsd.org Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (Postfix) with ESMTP id 77D02158DD for ; Mon, 30 Aug 1999 17:10:51 -0700 (PDT) (envelope-from julian@whistle.com) Received: from current1.whistle.com (current1.whistle.com [207.76.205.22]) by alpo.whistle.com (8.9.1a/8.9.1) with SMTP id RAA82861; Mon, 30 Aug 1999 17:09:20 -0700 (PDT) Date: Mon, 30 Aug 1999 17:10:03 -0700 (PDT) From: Julian Elischer To: Peter Dufault Cc: jeremyp@gsmx07.alcatel.com.au, jlemon@americantv.com, current@FreeBSD.ORG Subject: Re: HEADS UP In-Reply-To: <199908302359.TAA15498@hda.hda.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 30 Aug 1999, Peter Dufault wrote: > > there are very few values that could make sense in both Hours scale and > > usecs scale.. > > > > thus items that could be small could be in uSecs and items that could > > be big could be in Secs.. A small set of functions could be used to > > make this uniform through the system > > > > syscall_Secs_to_hz(ulong *ticks, boolean Allow_zero SYSCTL_HANDLER_ARGS) > > syscall_mSecs_to_hz(ulong *ticks, boolean Allow_zero, SYSCTL_HANDLER_ARGS) > > syscall_uSecs_to_hz(ulong *ticks, boolean Allow_zero, SYSCTL_HANDLER_ARGS) > > How about struct timeval instead? Firstly we are talking about time deltas, and on the sysctl side of things it's very hard to set 'timevals (as you'd need to set two different variables) so you need a single value on teh userland side of things. Inside the kernel it's all done in ticks, so you should store that. thus having chosen the two units for internal and external, the function almost defines itself. julian > > Peter > > -- > Peter Dufault (dufault@hda.com) Realtime development, Machine control, > HD Associates, Inc. Safety critical systems, Agency approval > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message