mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
feat: add thermal states to powerMonitor (#37935)
* feat: add thermal states to powerMonitor * update docs
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user