From 3d258f645f572bde3167ae8baf48a1fa9f7c649a Mon Sep 17 00:00:00 2001 From: fangshunjian Date: Fri, 11 Jan 2019 12:26:45 +0600 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E6=94=B9=E5=86=85=E5=AD=98?= =?UTF-8?q?=E5=88=A9=E7=94=A8=E7=8E=87=E8=8E=B7=E5=8F=96=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/nis/systeminfo/model/SystemInfo.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/nis/systeminfo/model/SystemInfo.java b/src/com/nis/systeminfo/model/SystemInfo.java index c628971..690dc72 100644 --- a/src/com/nis/systeminfo/model/SystemInfo.java +++ b/src/com/nis/systeminfo/model/SystemInfo.java @@ -200,7 +200,8 @@ public class SystemInfo sb.append(SEPARATOR); sb.append(doubleFormat(memFree / (1024 * 1024 * 1024.0), 2));// 当前内存剩余量,单位:"G" sb.append(SEPARATOR); - sb.append(doubleFormat(((memTotal - memFree) * 100.0) / memTotal, 1));// 内存使用率 + sb.append(doubleFormat(mem.getUsedPercent(), 1));// 内存使用率 +// sb.append(doubleFormat(((memTotal - memFree) * 100.0) / memTotal, 1));// 内存使用率 StringBuffer sb2 = new StringBuffer(); // sb2.append("内存总大小: " + doubleFormat(memTotal / (1024 * 1024 * 1024.0), 2) + "G, 现使用:" @@ -210,7 +211,7 @@ public class SystemInfo sb2.append("i18n_client.SystemInfo.memerySize_n81i: " + doubleFormat(memTotal / (1024 * 1024 * 1024.0), 2) + "G, i18n_client.SystemInfo.currentUsed_n81i:" + doubleFormat(memUsed / (1024 * 1024 * 1024.0), 2) + "G, i18n_client.SystemInfo.spaceRemain_n81i:" + doubleFormat(memFree / (1024 * 1024 * 1024.0), 2) + "G, i18n_client.SystemInfo.shiyonglv_n81i:" - + doubleFormat(((memTotal - memFree) * 100.0) / memTotal, 1) + "%"); + + doubleFormat(mem.getUsedPercent(), 1) + "%"); detectInfo.getDetailDatas().add(sb.toString()); detectInfo.setDescInfo(sb2.toString());