From: Wayne Davison <wayned@users.sourceforge.net>
To: Peter Stephenson <pws@csr.com>
Cc: Zsh hackers list <zsh-workers@sunsite.dk>
Subject: Re: PATCH: SECONDS can be floating point
Date: Tue, 29 Oct 2002 09:52:50 -0800 [thread overview]
Message-ID: <20021029175249.GB3142@scuzzy.blorf.net> (raw)
In-Reply-To: <1390.1035890598@csr.com>
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..
next prev parent reply other threads:[~2002-10-29 17:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-28 18:55 Peter Stephenson
2002-10-29 10:40 ` Peter Stephenson
2002-10-29 11:23 ` Peter Stephenson
2002-10-29 17:52 ` Wayne Davison [this message]
2002-10-29 18:08 ` Wayne Davison
2002-10-29 18:13 ` Peter Stephenson
2002-10-30 21:17 ` PATCH: my "SECONDS can be floating point" tweaks Wayne Davison
2002-10-31 5:09 ` Bart Schaefer
2002-10-31 18:53 ` Wayne Davison
2002-10-31 10:34 ` Peter Stephenson
2002-10-31 18:53 ` Wayne Davison
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20021029175249.GB3142@scuzzy.blorf.net \
--to=wayned@users.sourceforge.net \
--cc=pws@csr.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).