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:
> The problem was that if you made SECONDS local, then on return to the
> parent function, the time spent in the lower function didn't appear in
> the value of SECONDS

Are you sure this was a problem?  The internal value is a start time,
and the value returned is relative to "now", so it seems to me that as
long as the parent's SECONDS value is saved/restored literally when
localized that there is no need to fudge the value at all.  Perhaps the
bug is that the value is being saved/restored relative to "now"?  (I
haven't looked at the local-variable code enough to know for sure.)

..wayne..



Messages sorted by: Reverse Date, Date, Thread, Author