mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-20 05:53:52 +01:00
12 lines
248 B
Plaintext
12 lines
248 B
Plaintext
# Wait for given number of seconds, reading any data from
|
|
# all TCP connections while doing so.
|
|
|
|
typeset -F SECONDS to end
|
|
|
|
(( to = $1, end = SECONDS + to ))
|
|
while (( SECONDS < end )); do
|
|
tcp_read -a -T $to
|
|
(( to = end - SECONDS ))
|
|
done
|
|
return
|