You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to add support for automatically disabling compilation when using battery mode on a laptop? I've noticed that with automatic compilation enabled, CPU usage is very high, and I frequently need to manually disable it to reduce battery consumption.
The text was updated successfully, but these errors were encountered:
Yes, it is possible to check whether the laptop is running on battery power using code, at least on Windows, by utilizing the following PowerShell script:
$powerStatus=Get-WmiObject-Query "SELECT * FROM Win32_Battery"if ($powerStatus.BatteryStatus-eq1) {
Write-Output"Laptop is running on battery."
} else {
Write-Output"Laptop is plugged in."
}
Is it possible to add support for automatically disabling compilation when using battery mode on a laptop? I've noticed that with automatic compilation enabled, CPU usage is very high, and I frequently need to manually disable it to reduce battery consumption.
The text was updated successfully, but these errors were encountered: