OSSingleton.getPowerPercentLeft

Returns the amount of battery left in the device as a percentage. Returns -1 if power state is unknown. Note: This method is implemented on Linux, macOS and Windows.

struct OSSingleton
@nogc nothrow
long
getPowerPercentLeft
()

Meta