fix: SDA-2330 - Update API from querySystemIdleTime to getSystemIdleTime (#1043)

This commit is contained in:
Kiran Niranjan 2020-08-04 15:30:11 +05:30 committed by GitHub
parent 913bfb8d5c
commit 0c82066018
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,7 +66,7 @@ class MemoryMonitor {
return;
}
(electron.powerMonitor as any).querySystemIdleTime((time) => {
const time = electron.powerMonitor.getSystemIdleTime();
const idleTime = time * 1000;
// for MacOS use private else use residentSet
const memoryConsumption = isMac ? (this.memoryInfo && this.memoryInfo.private) : (this.memoryInfo && this.memoryInfo.residentSet);
@ -118,7 +118,6 @@ class MemoryMonitor {
setTimeout(() => {
this.canReload = true;
}, this.memoryRefreshThreshold); // prevents multiple reloading of the client within 24hrs
});
}
}