Jaa


BackgroundWorkCost.AppEnergyUsePrediction Property

Definition

Gets the predicted energy consumption of the background task.

public:
 static property EnergyUseLevel AppEnergyUsePrediction { EnergyUseLevel get(); };
/// [Windows.Foundation.Metadata.Experimental]
/// [get: Windows.Foundation.Metadata.Experimental]
static EnergyUseLevel AppEnergyUsePrediction();
static EnergyUseLevel AppEnergyUsePrediction();
[Windows.Foundation.Metadata.Experimental]
public static EnergyUseLevel AppEnergyUsePrediction { [Windows.Foundation.Metadata.Experimental] get; }
public static EnergyUseLevel AppEnergyUsePrediction { get; }
var energyUseLevel = BackgroundWorkCost.appEnergyUsePrediction;
Public Shared ReadOnly Property AppEnergyUsePrediction As EnergyUseLevel

Property Value

The predicted energy consumption of the background task, returned as a value of the EnergyUseLevel enumeration.

Attributes

Windows requirements

Device family
Windows 11 Insider Preview (introduced in 10.0.23504.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v15.0)

Remarks

This property allows a developer to check if their application's background tasks may be throttled in modern standby.

The AppEnergyUsePrediction indicates the energy use by its background tasks in modern standby, and provides a diagnostic tool for developers before any system decisions are made. If the AppEnergyUsePrediction is EnergyUseTrend.OverBudget, it indicates the application is running background tasks at a rate that will cause its energy use to be over budget. Developers can monitor this trend and reduce work done in modern standby before being throttled.

Applies to