From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22027 invoked from network); 29 Oct 2002 17:54:19 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 29 Oct 2002 17:54:19 -0000 Received: (qmail 10509 invoked by alias); 29 Oct 2002 17:53:55 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17874 Received: (qmail 10477 invoked from network); 29 Oct 2002 17:53:52 -0000 Date: Tue, 29 Oct 2002 09:52:50 -0800 From: Wayne Davison To: Peter Stephenson Cc: Zsh hackers list Subject: Re: PATCH: SECONDS can be floating point Message-ID: <20021029175249.GB3142@scuzzy.blorf.net> References: <23260.1035888025@csr.com> <1390.1035890598@csr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1390.1035890598@csr.com> User-Agent: Mutt/1.3.28i On Tue, Oct 29, 2002 at 11:23:18AM +0000, Peter Stephenson wrote: > This fixes the problem by restoring SECONDS to include the elapsed > time spent in the function. Of course, the accuracy won't be perfect, > but it wouldn't be anyway. How about this instead: keep the value internally in float format continuously, and then change back to a single accessor function that returns a rounded integer if the type of the variable is set to integer. This helps to avoid rounding errors, and keeps things a little more accurate in this scenario. ..wayne..