summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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