Fix: error about RAM
This commit is contained in:
parent
82c5b35d07
commit
478a849e8d
|
@ -197,17 +197,17 @@ function system(mainWindow, dir, lang, dirname) {
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
})
|
})
|
||||||
|
|
||||||
var cbTimer1;
|
var cbTimer1;
|
||||||
ipc.on('startmem', (e, arg) => {
|
ipc.on('startmem', (e, arg) => {
|
||||||
cbTimer1 = setInterval(mems(e), 1000);
|
event = e.sender
|
||||||
function mems(e) {
|
cbTimer1 = setInterval(mems, 1000);
|
||||||
|
});
|
||||||
|
function mems() {
|
||||||
var mem = os.totalmem() - os.freemem();
|
var mem = os.totalmem() - os.freemem();
|
||||||
if (mainWindow) {
|
if (mainWindow) {
|
||||||
e.sender.webContents.send('memory', [mem, os.cpus()[0].model, os.totalmem()]);
|
event.webContents.send('memory', [mem, os.cpus()[0].model, os.totalmem()]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
ipc.on('endmem', (e, arg) => {
|
ipc.on('endmem', (e, arg) => {
|
||||||
if (cbTimer1) {
|
if (cbTimer1) {
|
||||||
clearInterval(cbTimer1);
|
clearInterval(cbTimer1);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user