Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: SECONDS can be floating point
- X-seq: zsh-workers 17874
- From: Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx>
- To: Peter Stephenson <pws@xxxxxxx>
- Subject: Re: PATCH: SECONDS can be floating point
- Date: Tue, 29 Oct 2002 09:52:50 -0800
- Cc: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- In-reply-to: <1390.1035890598@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <23260.1035888025@xxxxxxx> <1390.1035890598@xxxxxxx>
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..
Messages sorted by:
Reverse Date,
Date,
Thread,
Author