diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2024-04-17 15:55:00 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2024-04-17 15:55:00 +0800 |
commit | e7e57325d4d929df3652c5caaec2edbe471e9157 (patch) | |
tree | 7110c5c373e37afe4367e608083f5bd0ac2b4cec /script | |
parent | fe20694bfbf81961be705107cfc9765fac090c0e (diff) | |
download | lua-language-server-e7e57325d4d929df3652c5caaec2edbe471e9157.zip |
thread.sleep 改成毫秒
Diffstat (limited to 'script')
-rw-r--r-- | script/brave/work.lua | 2 | ||||
-rw-r--r-- | script/service/service.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/script/brave/work.lua b/script/brave/work.lua index a6a7a41e..0514d1e2 100644 --- a/script/brave/work.lua +++ b/script/brave/work.lua @@ -65,7 +65,7 @@ end) brave.on('timer', function (time) local thread = require 'bee.thread' while true do - thread.sleep(time) + thread.sleep(math.floor(time * 1000)) brave.push('wakeup') end end) diff --git a/script/service/service.lua b/script/service/service.lua index b6056390..2c19b4f6 100644 --- a/script/service/service.lua +++ b/script/service/service.lua @@ -180,7 +180,7 @@ function m.eventLoop() local function sleep() idle() for _ = 1, 10 do - thread.sleep(0.1) + thread.sleep(100) if doSomething() then return end |