{{newin|[[0.9.0]]|090|type=function}}
Gets information about the system's power supply.

== Function ==
=== Synopsis ===
<source lang="lua">
state, percent, seconds = love.system.getPowerInfo( )
</source>
=== Arguments ===
None.
=== Returns ===
{{param|PowerState|state|The basic state of the power supply.}}
{{param|number|percent (nil)|Percentage of battery life left, between 0 and 100. nil if the value can't be determined or there's no battery.}}
{{param|number|seconds (nil)|Seconds of battery life left. nil if the value can't be determined or there's no battery.}}

== Examples ==
Print to console battery state, percent battery remaining, and seconds of battery life remaining. Note that percent and seconds remaining will be nil if no battery is present.
<source lang="lua">
function love.load()
    print(love.system.getPowerInfo())
end
</source>

== See Also ==
* [[parent::love.system]]
* [[PowerState]]
[[Category:Functions]]
{{#set:Description=Gets information about the system's power supply.}}
== Other Languages ==
{{i18n|love.system.getPowerInfo}}