Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: foo=${(z)${(s:.:)SECONDS}} ; echo ${foo[1]}.${(r:2:)foo[2]}
- X-seq: zsh-users 12110
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: foo=${(z)${(s:.:)SECONDS}} ; echo ${foo[1]}.${(r:2:)foo[2]}
- Date: Thu, 25 Oct 2007 10:29:30 +0100
- In-reply-to: <20071025100559.6bd494cf@news01>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20071025033706.12434.qmail@xxxxxxxxxxx> <20071025100559.6bd494cf@news01>
Peter Stephenson wrote:
> On Thu, 25 Oct 2007 16:37:03 +1300 (NZDT)
> Atom Smasher <atom@xxxxxxxxxxx> wrote:
> > from the man page...
> >
> > For example, `typeset -F SECONDS' causes the value to be reported
> > as a floating point number. The precision is six decimal places, although
> > not all places may be useful.
>
> "Six" is wrong, ten is correct, but this is the wrong place to document it.
> I'll fix that.
Aargh. OK. The *precision*, in the sense that the floating point
number comes out with so many digits, is indeed 10. However, the
*accuracy* is 6 digits. That's because when it's floating point SECONDS
uses a microsecond timer. That's what I should be saying in the manual.
> typeset -F 2 SECONDS
is still the, er, right answer to the question you asked.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author