diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-11-02 19:42:11 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-11-02 19:42:11 +0800 |
commit | ededf909f340f582195ba2f88b85787fa3142be1 (patch) | |
tree | 1dabe73fcecdd42d8a1d8a2e817892a3576f3d3c /script-beta | |
parent | 5243d38793549354fc137831f3481137a882f77e (diff) | |
download | lua-language-server-ededf909f340f582195ba2f88b85787fa3142be1.zip |
调整一下代码
Diffstat (limited to 'script-beta')
-rw-r--r-- | script-beta/provider/diagnostic.lua | 4 |
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 |