BackgroundEnergyDiagnostics.ComputeTotalEnergyUsage BackgroundEnergyDiagnostics.ComputeTotalEnergyUsage BackgroundEnergyDiagnostics.ComputeTotalEnergyUsage BackgroundEnergyDiagnostics.ComputeTotalEnergyUsage 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 ulong ComputeTotalEnergyUsage()
static ulong ComputeTotalEnergyUsage() const;
public static ulong ComputeTotalEnergyUsage()
Public Shared Function ComputeTotalEnergyUsage() As ulong
var ulong = Windows.System.Power.Diagnostics.BackgroundEnergyDiagnostics.computeTotalEnergyUsage();

Returns

ulong ulong ulong

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

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.