mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-26 20:20:53 +03:00
shorter lua sleep
This commit is contained in:
parent
65ed5ab2f5
commit
005a930df4
@ -212,7 +212,7 @@ fsleep_setup()
|
|||||||
elif ucode -e "system(['sleep','1'], 1)" 2>/dev/null; then
|
elif ucode -e "system(['sleep','1'], 1)" 2>/dev/null; then
|
||||||
FSLEEP=4
|
FSLEEP=4
|
||||||
# older openwrt may have lua and nixio lua module
|
# older openwrt may have lua and nixio lua module
|
||||||
elif lua -e 'local nixio = require "nixio"; nixio.nanosleep(0,1);' 2>/dev/null ; then
|
elif lua -e 'require "nixio".nanosleep(0,1)' 2>/dev/null ; then
|
||||||
FSLEEP=5
|
FSLEEP=5
|
||||||
else
|
else
|
||||||
FSLEEP=0
|
FSLEEP=0
|
||||||
@ -236,7 +236,7 @@ minsleep()
|
|||||||
ucode -e "system(['sleep','1'], 100)"
|
ucode -e "system(['sleep','1'], 100)"
|
||||||
;;
|
;;
|
||||||
5)
|
5)
|
||||||
lua -e 'local nixio = require "nixio"; nixio.nanosleep(0,100000000);'
|
lua -e 'require "nixio".nanosleep(0,100000000)'
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
sleep 1
|
sleep 1
|
||||||
|
Loading…
Reference in New Issue
Block a user