mirror of
https://github.com/MCSManager/MCSManager.git
synced 2024-11-27 06:59:54 +08:00
Update center.js
优化代码
This commit is contained in:
parent
829ccd703d
commit
5d95cfccc6
@ -95,12 +95,12 @@ setInterval(function () {
|
||||
system: mversion.system
|
||||
}
|
||||
|
||||
let useMemBai = ((os.freemem() / 1024) / (os.totalmem() / 1024) * 100).toFixed(0);
|
||||
let useMemBai = (os.freemem() / os.totalmem() * 100).toFixed(0);
|
||||
//压入记录器
|
||||
MCSERVER.logCenter.pushLogData('CPU', tools.getMineTime(), parseInt(cacheCPU));
|
||||
MCSERVER.logCenter.pushLogData('RAM', tools.getMineTime(), 100 - useMemBai);
|
||||
|
||||
setTimeout(() => counter.save(), 0); //让其异步的去保存
|
||||
setTimeout(() => counter.save(), 0); //让其异步地去保存
|
||||
}, MCSERVER.localProperty.data_center_times);
|
||||
|
||||
|
||||
@ -108,4 +108,4 @@ setInterval(function () {
|
||||
WebSocketObserver().listener('center/show', (data) => {
|
||||
if (!permssion.isMaster(data.WsSession)) return;
|
||||
response.wsSend(data.ws, 'center/show', cacheSystemInfo);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user