Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: SECONDS can be floating point



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