From 005a930df449dfdab0f8595f0247b7714f89d770 Mon Sep 17 00:00:00 2001 From: bol-van Date: Fri, 3 Nov 2023 09:47:15 +0300 Subject: [PATCH] shorter lua sleep --- common/base.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/base.sh b/common/base.sh index b0c7227..93105b3 100644 --- a/common/base.sh +++ b/common/base.sh @@ -212,7 +212,7 @@ fsleep_setup() elif ucode -e "system(['sleep','1'], 1)" 2>/dev/null; then FSLEEP=4 # 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 else FSLEEP=0 @@ -236,7 +236,7 @@ minsleep() ucode -e "system(['sleep','1'], 100)" ;; 5) - lua -e 'local nixio = require "nixio"; nixio.nanosleep(0,100000000);' + lua -e 'require "nixio".nanosleep(0,100000000)' ;; *) sleep 1