feat: add thermal states to powerMonitor (#37935)

* feat: add thermal states to powerMonitor

* update docs
This commit is contained in:
Jeremy Rose 2023-04-19 02:46:55 -07:00 committed by GitHub
parent b2411e05a8
commit ba835ddac1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 93 additions and 2 deletions

View file

@ -4,6 +4,7 @@ const {
createPowerMonitor,
getSystemIdleState,
getSystemIdleTime,
getCurrentThermalState,
isOnBatteryPower
} = process._linkedBinding('electron_browser_power_monitor');
@ -40,6 +41,10 @@ class PowerMonitor extends EventEmitter {
return getSystemIdleState(idleThreshold);
}
getCurrentThermalState () {
return getCurrentThermalState();
}
getSystemIdleTime () {
return getSystemIdleTime();
}