Function OSSingleton.getPowerState

Returns the current state of the device regarding battery and power. See powerstate constants. Note: This method is implemented on Linux, macOS and Windows.

OSSingleton.PowerState getPowerState() nothrow @nogc;