ForegroundEnergyDiagnostics.ComputeTotalEnergyUsage Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Computes the total cumulative energy usage of the foreground app since the last reset, expressed as a percentage of normal.
Important
This method consumes significant CPU resources. We recommend using this method only for debugging purposes.
public:
static unsigned long long ComputeTotalEnergyUsage();
static uint64_t ComputeTotalEnergyUsage();
/// [Windows.Foundation.Metadata.Deprecated("Background Energy Diagnostics has been deprecated. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 393216, "Windows.Foundation.UniversalApiContract")]
static uint64_t ComputeTotalEnergyUsage();
public static ulong ComputeTotalEnergyUsage();
[Windows.Foundation.Metadata.Deprecated("Background Energy Diagnostics has been deprecated. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 393216, "Windows.Foundation.UniversalApiContract")]
public static ulong ComputeTotalEnergyUsage();
function computeTotalEnergyUsage()
Public Shared Function ComputeTotalEnergyUsage () As ULong
Returns
The total cumulative energy usage of the foreground app since the last reset, expressed as a percentage of normal.
- Attributes
Remarks
Important
This method consumes significant CPU resources. We recommend using this method only for debugging purposes.
Reset the energy usage total by calling ResetTotalEnergyUsage.
The energy usage of a foreground app is classified into one these predefined levels, from lowest to highest energy consumption: LowUsageLevel, NearMaxAcceptableUsageLevel, MaxAcceptableUsageLevel, or ExcessiveUsageLevel.