From 85ab66fe6ee5440482a8f652c412cd063e9d37bc Mon Sep 17 00:00:00 2001 From: qiminbao Date: Thu, 30 Oct 2025 16:43:45 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=90=AF=E5=8A=A8=E5=A2=9E=E5=8A=A0=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E7=9B=91=E6=8E=A7=E7=AD=96=E7=95=A5=E6=9C=BA=E5=88=B6?= =?UTF-8?q?=EF=BC=9B=202.cpu=E4=B8=8A=E6=8A=A5=E6=95=B0=E6=8D=AE=E5=8D=95?= =?UTF-8?q?=E4=BD=8D=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/tongran/agent/client/service/impl/CPUServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/tongran/agent/client/service/impl/CPUServiceImpl.java b/src/main/java/com/tongran/agent/client/service/impl/CPUServiceImpl.java index e79fc65..b8a6c9a 100644 --- a/src/main/java/com/tongran/agent/client/service/impl/CPUServiceImpl.java +++ b/src/main/java/com/tongran/agent/client/service/impl/CPUServiceImpl.java @@ -47,7 +47,7 @@ public class CPUServiceImpl implements CPUService { TimeUnit.SECONDS.sleep(1); // 正式采样 long[] prevTicks = processor.getSystemCpuLoadTicks(); - TimeUnit.SECONDS.sleep(2); // 更长间隔,减少抖动 + TimeUnit.SECONDS.sleep(1); // 更长间隔,减少抖动 // 计算使用率 double cpuUsage = processor.getSystemCpuLoadBetweenTicks(prevTicks); cpuVO.setUti(cpuUsage * 100); // CPU使用率