Class PowerUsage

Definition

Namespace:
Tizen.System
Assembly:
Tizen.System.PowerUsage.dll
API Level:
7
Privilege Level:
public
Privilege:
http://tizen.org/privilege/systemmonitor
Feature:
http://tizen.org/feature/battery

Provides information related to the power consumption by applications or by hardware resources on a battery-powered device for a given duration of time.

C#
Copy
public static class PowerUsage : object
Inheritance
PowerUsage

Methods

View Source

GetPowerUsage(String, DateTime, DateTime)

Gets the total battery usage in mAh(milli-Ampere hour) by an application for certain time interval.

Declaration
C#
Copy
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.

API Level: 7
Privilege Level: public
Privilege: http://tizen.org/privilege/systemmonitor
Feature: http://tizen.org/feature/battery
View Source

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
C#
Copy
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.

API Level: 7
Privilege Level: public
Privilege: http://tizen.org/privilege/systemmonitor
Feature: http://tizen.org/feature/battery
View Source

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
C#
Copy
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.

API Level: 7
Privilege Level: public
Privilege: http://tizen.org/privilege/systemmonitor
Feature: http://tizen.org/feature/battery
View Source

GetPowerUsage(PowerUsageResourceType, DateTime, DateTime)

Gets the battery usage in mAh(milli-Ampere hour) by a resource for certain time interval.

Declaration
C#
Copy
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.

API Level: 7
Privilege Level: public
Privilege: http://tizen.org/privilege/systemmonitor
Feature: http://tizen.org/feature/battery