summaryrefslogtreecommitdiff
path: root/script-beta
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-11-02 19:42:11 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-11-02 19:42:11 +0800
commitededf909f340f582195ba2f88b85787fa3142be1 (patch)
tree1dabe73fcecdd42d8a1d8a2e817892a3576f3d3c /script-beta
parent5243d38793549354fc137831f3481137a882f77e (diff)
downloadlua-language-server-ededf909f340f582195ba2f88b85787fa3142be1.zip
调整一下代码
Diffstat (limited to 'script-beta')
-rw-r--r--script-beta/provider/diagnostic.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/script-beta/provider/diagnostic.lua b/script-beta/provider/diagnostic.lua
index fe014b5f..b33bd933 100644
--- a/script-beta/provider/diagnostic.lua
+++ b/script-beta/provider/diagnostic.lua
@@ -223,12 +223,12 @@ function m.onDelay()
if not await.hasID 'diagnosticsAll' then
return
end
- local currentClock = os.clock()
- local passed = currentClock - m.diagnosticsAllClock
local speedRate = config.config.diagnostics.workspaceRate
if speedRate <= 0 or speedRate >= 100 then
return
end
+ local currentClock = os.clock()
+ local passed = currentClock - m.diagnosticsAllClock
local sleepTime = passed * (100 - speedRate) / speedRate + m.sleepRest
m.sleepRest = 0.0
if sleepTime < 0.001 then