BackgroundEnergyDiagnostics.ComputeTotalEnergyUsage Method

Definition

Computes the total cumulative energy usage of the background task 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

UInt64

unsigned long long

uint64_t

The total cumulative energy usage of the background task since the last reset, expressed as a percentage of normal.

Attributes

Remarks

Reset the energy usage total by calling ResetTotalEnergyUsage.

The energy usage of a background task is classified into one of these predefined levels, from lowest to highest energy consumption: LowUsageLevel, NearMaxAcceptableUsageLevel, MaxAcceptableUsageLevel, ExcessiveUsageLevel, NearTerminationUsageLevel, or TerminationUsageLevel.

Applies to