feat: add thermal states to powerMonitor (#37935)
* feat: add thermal states to powerMonitor * update docs
This commit is contained in:
parent
b2411e05a8
commit
ba835ddac1
5 changed files with 93 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue