[arch-projects] [netcfg] [PATCH 3/4] Lower latency in timeout_wait
Henrik Hallberg
henrik at k2h.se
Mon Jul 2 17:07:19 EDT 2012
---
src/globals | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/globals b/src/globals
index 436334a..62cce3e 100644
--- a/src/globals
+++ b/src/globals
@@ -100,10 +100,11 @@ function checkyesno() {
# $2...: condition command
function timeout_wait() {
local timeout="$1"
+ (( timeout *= 10 ))
shift
while ! eval "$*"; do
(( timeout-- > 0 )) || return 1
- sleep 1
+ sleep 0.1
done
return 0
}
--
1.7.11.1
More information about the arch-projects
mailing list