mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-11 17:29:16 +05:00
nanosleep: use ucode on newer openwrt
This commit is contained in:
parent
81b60aa4ed
commit
8c4faefa68
@ -208,6 +208,9 @@ fsleep_setup()
|
||||
local errtext=$(read -t 0.001 2>&1)
|
||||
if [ -z "$errtext" ]; then
|
||||
FSLEEP=3
|
||||
# newer openwrt has ucode with system function that supports timeout in ms
|
||||
elif ucode -e "system(['sleep','infinity'], 1)"; then
|
||||
FSLEEP=4
|
||||
else
|
||||
FSLEEP=0
|
||||
fi
|
||||
@ -226,6 +229,9 @@ minsleep()
|
||||
3)
|
||||
read -t 0.1
|
||||
;;
|
||||
4)
|
||||
ucode -e "system(['sleep','infinity'], 100)"
|
||||
;;
|
||||
*)
|
||||
sleep 1
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user