From ededf909f340f582195ba2f88b85787fa3142be1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 2 Nov 2020 19:42:11 +0800 Subject: =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=80=E4=B8=8B=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-beta/provider/diagnostic.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'script-beta/provider') 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 -- cgit v1.2.3