pyufunc.sensor_battery#
- pyufunc.sensor_battery(time_unit='seconds')#
Return battery status information.
- Parameters:
time_unit (str) – The unit of the returned time values. Defaults to “seconds”.
"seconds" (-) – Return time values in seconds.
"minutes" (-) – Return time values in minutes.
"hours" (-) – Return time values in hours.
recognized (If the unit is not)
"seconds". (it will default to)
Note
Source package:
psutil.Source repository: giampaolo/psutil
Source document: https://psutil.readthedocs.io/en/latest/
Source license: BSD 3-Clause License.
Example
>>> sensor_battery()
- Returns:
A named tuple representing the battery status information, or None if no battery is found.
- Return type:
psutil.sensors_battery