Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: typeset -F3 SECONDS doesn't work the first time
- X-seq: zsh-workers 30541
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: typeset -F3 SECONDS doesn't work the first time
- Date: Thu, 28 Jun 2012 19:04:31 +0200
- Cc: zsh workers <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=RqutLbhBBLCBrpcGEe876+UTa7RfdQvi+Pq22x7y94E=; b=D2Ybnoc4/PBufDvyfuu5MqmWdPanQ8B+cveymWh4C4lwFbRAZR0H5R/Ms1yFxhu7Ip A9IjNyYCS7dyNICh0WO6A7CDk2shuXrYF2MRq69i2zdvz3snvOphnHjliYf/TK18NY0Y 07h3Ca3ZK6BPu3LkgHSX0THKvuEKBmFuiZOyjiOdx8jYE9ofDUaJ8SlW+8g3t+Akp3AX wtAzOVf6XIZ3UOOPN1YFmpx1f4wi7cNGELrPmAKCdy7oV1BqAs4YXyyKWS0TTF4Y98L+ wPp6OMg0Zgxen+a9W0qXoZxn7O41FSzg8a7KIcDLE1OaqUDFiNREjsC6fkCNltx6cq1K Z2kg==
- In-reply-to: <120628095403.ZM27189@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAHYJk3STsMvjebgpL5i_H1r2goNT4wV7AmhPPBdH1DGMAkZjEg@mail.gmail.com> <120627105032.ZM25924@torch.brasslantern.com> <CAHYJk3TR6G2WPy_u3n=64yYXuW9XsH1UPqPwqKCQSHpYXRD5Fg@mail.gmail.com> <120628095403.ZM27189@torch.brasslantern.com>
On 28/06/2012, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> Aside: Exporting SECONDS doesn't do what you might think. The value at
> the time of the export is enshrined in the environment and never changes,
> and is thereafter the starting clock for newly-started shells.
Another aside:
% while =sleep 0.1; do zsh -c 'typeset -F4 SECONDS; echo $SECONDS';
done | head -n 13|xargs
0.0020 0.0020 0.0019 0.0019 0.0019 0.0023 0.0019 0.0013 0.0023 0.0020
0.0020 0.0019 0.0019
but:
% while sleep 0.1; do SECONDS=15 zsh -c 'typeset -F4 SECONDS; echo
$SECONDS'; done | head -n 13 | xargs
15.1560 15.2605 15.3650 15.4694 15.5738 15.6783 15.7827 15.8871
15.9916 15.0961 15.2004 15.3047 15.4091
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author