diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-02-03 17:57:04 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-02-03 17:57:04 +0800 |
commit | 723f3d218e51e2556cfb754db901406a0f9c5164 (patch) | |
tree | 9c4a72c0e680526b6aa1d6a3bb815ec994dd6cde | |
parent | e2be2ba101a9da1bf81202e32c0d710cdcb79679 (diff) | |
download | lua-language-server-723f3d218e51e2556cfb754db901406a0f9c5164.zip |
#329 reduce idle cycle period to 0.01 sec
-rw-r--r-- | script/brave/brave.lua | 2 | ||||
-rw-r--r-- | script/brave/work.lua | 2 | ||||
-rw-r--r-- | script/service/service.lua | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/script/brave/brave.lua b/script/brave/brave.lua index 08909074..c497c093 100644 --- a/script/brave/brave.lua +++ b/script/brave/brave.lua @@ -46,7 +46,7 @@ function m.start() local suc, name, id, params = m.taskpad:pop() if not suc then -- 找不到工作的勇者,只好睡觉 - thread.sleep(0.001) + thread.sleep(0.01) goto CONTINUE end local ability = m.ability[name] diff --git a/script/brave/work.lua b/script/brave/work.lua index 5ec8178f..0b4925b7 100644 --- a/script/brave/work.lua +++ b/script/brave/work.lua @@ -15,7 +15,7 @@ brave.on('loadProto', function () return end brave.push('proto', proto) - thread.sleep(0.001) + thread.sleep(0.01) end end) diff --git a/script/service/service.lua b/script/service/service.lua index 8f76a294..f20c6306 100644 --- a/script/service/service.lua +++ b/script/service/service.lua @@ -149,7 +149,7 @@ function m.startTimer() m.working = false m.idleClock = os.clock() end - thread.sleep(0.001) + thread.sleep(0.01) ::CONTINUE:: timer.update() end |