Commit 6ed493ee authored by Henrik Hallberg's avatar Henrik Hallberg Committed by Jouke Witteveen
Browse files

Lower latency in timeout_wait

parent 7e2ff917
......@@ -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
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment