Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: math, percentage
- X-seq: zsh-users 9812
- From: Jonathan Hankins <jonathan-hankins@xxxxxxxxxxxxxx>
- To: <zsh-users@xxxxxxxxxx>
- Subject: Re: math, percentage
- Date: Thu, 05 Jan 2006 17:54:51 -0600
- In-reply-to: <00af01c611b2$a287fdb0$951fa8c0@venti> (Brian K. White's message of "Wed, 4 Jan 2006 23:43:54 -0500")
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <024d01c60dd7$576ed990$931fa8c0@venti> <20051231072500.GJ39217@xxxxxxxxxxxxxxxx> <00df01c60e4a$fb8d2d60$931fa8c0@venti> <488030720601041505g7a9aee72nc8ebcf1bde13b3a4@xxxxxxxxxxxxxx> <00af01c611b2$a287fdb0$951fa8c0@venti>
- Sender: Jonathan Hankins <jonathan-hankins@xxxxxxxxxxxxxx>
"Brian K. White" <brian@xxxxxxxxx> writes:
> explicitly on the bang line. My biggest item about ksh93 lately is
> that it has a built-in sleep that takes floating point values. I have
> things that really do want a "sleep .1", and anything that wants that,
> by definition also really wants it built-in, not to fork a child and
> load an executable every time. No other shell anywhere has that that
> I've found. (hint!) Perl has nap() and probably other popular non
According to zshmodules(1), you can use zselect to sleep with
approximately 1/100 sec. granulatiry.
typeset -F SECONDS
zmodload -i zsh/zselect
print $SECONDS
# sleep for 1/5 sec
zselect -t 20
print $SECONDS
On my system, this gives:
922.1230270000
922.3312820000
-Jonathan Hankins
--
+------------------+-----------------------------------------------------+
|Jonathan Hankins | jonathan-hankins@xxxxxxxxxxxxxx |
+------------------+-----------------------------------------------------+
Messages sorted by:
Reverse Date,
Date,
Thread,
Author