Skip to content

Commit

Permalink
No longer fork the sleep reads
Browse files Browse the repository at this point in the history
  • Loading branch information
lynxthecat committed May 18, 2023
1 parent cf6de5a commit 0261add
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cake-autorate_lib.sh
Expand Up @@ -25,8 +25,7 @@ sleep_s()
# - https://github.com/lynxthecat/cake-autorate/issues/174#issuecomment-1460074498

local sleep_duration_s=${1} # (seconds, e.g. 0.5, 1 or 1.5)
read -r -t "${sleep_duration_s}" -u "${__sleep_fd}" || : &
wait "${!}"
read -r -t "${sleep_duration_s}" -u "${__sleep_fd}" || :
}

sleep_us()
Expand Down

0 comments on commit 0261add

Please sign in to comment.