From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Re: typeset -F3 SECONDS doesn't work the first time
Date: Thu, 28 Jun 2012 11:06:58 -0700 [thread overview]
Message-ID: <120628110658.ZM27841@torch.brasslantern.com> (raw)
In-Reply-To: <CAHYJk3T+UDNm-Lj91KSaEVOkdqTdxQDP7zgKPFL_0-F=1cTTOg@mail.gmail.com>
On Jun 28, 7:04pm, Mikael Magnusson wrote:
}
} 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
I'm not sure what you're illustrating. Did you intend to switch from
/bin/sleep to the builtin sleep in the second example? Does a value
for sleep of less than 1 second even have any useful effect?
OTOH, it doesn't seem to matter much to the output. I'm not sure where
the fractional part of $SECONDS is coming from when an initial value is
assigned.
next prev parent reply other threads:[~2012-06-28 18:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-26 16:26 Mikael Magnusson
2012-06-27 17:50 ` Bart Schaefer
2012-06-27 17:58 ` Mikael Magnusson
2012-06-28 16:54 ` Bart Schaefer
2012-06-28 17:04 ` Mikael Magnusson
2012-06-28 18:06 ` Bart Schaefer [this message]
2012-06-28 18:11 ` Mikael Magnusson
2012-06-28 22:00 ` Bart Schaefer
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=120628110658.ZM27841@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/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).