Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Sleep: was Re: Lonely spacecowboy



"Brian K. White" wrote:
> Veering off topic, though still topical in so far as it's about zsh: One 
> feature I do miss isn't there in the current version either. Only real ksh 
> has, as far as I've been able to tell even today, built-in sleep that 
> accepts less than one second values.

You can do this (works OK on Cygwin):

  zmodload -i zsh/zselect
  zselect -t 10

The time is in 100ths of a second, because I didn't use floating point
numbers (I would have if I was doing it now).  Also, the status returned
is 1 whether or not it was interrupted (because it's really a timeout),
so this is a little inconvenient.

We could do with a builtin, which would be fairly easy.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php

To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview



Messages sorted by: Reverse Date, Date, Thread, Author