Class PowerUsage
Definition
- Assembly:
- Tizen.System.PowerUsage.dll
Provides information related to the power consumption by applications or by hardware resources on a battery-powered device for a given duration of time.
public static class PowerUsage
- Inheritance
-
objectPowerUsage
Methods
View SourceGetPowerUsage(string, DateTime, DateTime)
Gets the total battery usage in mAh(milli-Ampere hour) by an application for certain time interval.
Declaration
public static double GetPowerUsage(string appID, DateTime start, DateTime end)
Parameters
Type | Name | Description |
---|---|---|
string | appID | Application ID of the application for which battery usage is required. |
DateTime | start | Start Time for data in DateTime. |
DateTime | end | End Time for data in DateTime. |
Returns
Type | Description |
---|---|
double | Returns the total battery usage in mAh(milli-Ampere hour) by an application for certain time interval. |
GetPowerUsage(string, IList<PowerUsageResourceType>, DateTime, DateTime)
Gets the battery consumption in mAh(milli-Ampere hour) for the resources specified by the application in custom interval.
Declaration
public static IDictionary<PowerUsageResourceType, double> GetPowerUsage(string appID, IList<PowerUsageResourceType> rtypes, DateTime start, DateTime end)
Parameters
Type | Name | Description |
---|---|---|
string | appID | Application ID of the application for which battery usage is required. |
IList<><PowerUsageResourceType> | rtypes | list of resource type identifiers like BLE, WiFi, CPU etc. |
DateTime | start | Start Time for data in DateTime. |
DateTime | end | End Time for data in DateTime. |
Returns
Type | Description |
---|---|
IDictionary<, ><PowerUsageResourceType, double> | Returns the battery consumption in mAh(milli-Ampere hour) for the resources specified by the application in custom interval. |
GetPowerUsage(string, PowerUsageResourceType, DateTime, DateTime)
Gets the battery consumption in mAh(milli-Ampere hour) for the specific resource for the given application in custom interval.
Declaration
public static double GetPowerUsage(string appID, PowerUsageResourceType rtype, DateTime start, DateTime end)
Parameters
Type | Name | Description |
---|---|---|
string | appID | Application ID of the application for which battery usage is required. |
PowerUsageResourceType | rtype | Identifier of resource type. BLE, WiFi, CPU etc. |
DateTime | start | Start Time for data in DateTime. |
DateTime | end | End Time for data in DateTime. |
Returns
Type | Description |
---|---|
double | Returns the battery consumption in mAh(milli-Ampere hour) for the specific resource for the given application in custom interval. |
GetPowerUsage(PowerUsageResourceType, DateTime, DateTime)
Gets the battery usage in mAh(milli-Ampere hour) by a resource for certain time interval.
Declaration
public static double GetPowerUsage(PowerUsageResourceType rtype, DateTime start, DateTime end)
Parameters
Type | Name | Description |
---|---|---|
PowerUsageResourceType | rtype | Identifier of resource type. BLE, WiFi, CPU etc. |
DateTime | start | Start Time for data in DateTime. |
DateTime | end | End Time for data in DateTime. |
Returns
Type | Description |
---|---|
double | Returns the battery usage in mAh(milli-Ampere hour) by a resource for certain time interval. |