Battery

Main battery class

Constructors

this
this(string battery_name)

Constructor.

this
this()

Cunstructor. Uses first battery, returned by getBatteryList()

Members

Functions

level
float level()

Current battery level. 0-100%

name
string name()

Battery name.

raw
string[string] raw()

Raw battery data.

status
BatteryStatus status()

Current battery status.

timeRemaining
Duration timeRemaining()

Time remaining. Duration.zero if battery full or charging.

timeUntilFull
Duration timeUntilFull()

Time until battery is full. Duration.zero if battery full or discharging.

update
void update()

Updates battery info

Meta