From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3603 invoked by alias); 28 Jun 2012 17:12:56 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 30541 Received: (qmail 13499 invoked from network); 28 Jun 2012 17:12:45 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.210.43 as permitted sender) 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== MIME-Version: 1.0 In-Reply-To: <120628095403.ZM27189@torch.brasslantern.com> References: <120627105032.ZM25924@torch.brasslantern.com> <120628095403.ZM27189@torch.brasslantern.com> Date: Thu, 28 Jun 2012 19:04:31 +0200 Message-ID: Subject: Re: typeset -F3 SECONDS doesn't work the first time From: Mikael Magnusson To: Bart Schaefer Cc: zsh workers Content-Type: text/plain; charset=UTF-8 On 28/06/2012, Bart Schaefer 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