# AdaptivePerformanceIdleTimeTracker

> Tracks how long the player has been idle so battery mode can reduce quality further during inactivity.

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine.AdaptivePerformance](/engine/6000.7/script-reference/unityengine/adaptiveperformance.md)
* **Assembly:** UnityEngine.AdaptivePerformanceModule

```csharp
public class AdaptivePerformanceIdleTimeTracker
```

## Remarks

By default, idle detection uses the legacy Input Manager (`Input.anyKey` and `Input.mousePositionDelta`). If the legacy Input Manager is disabled, idle detection stops and battery mode's idle-based scaling becomes inactive. To re-enable it, assign [AdaptivePerformanceIdleTimeTracker.IsAnyKeyPressedProvider](/engine/6000.7/script-reference/unityengine/adaptiveperformance/adaptiveperformanceidletimetracker/isanykeypressedprovider.md) and [AdaptivePerformanceIdleTimeTracker.IsCursorMovingProvider](/engine/6000.7/script-reference/unityengine/adaptiveperformance/adaptiveperformanceidletimetracker/iscursormovingprovider.md) with implementations backed by your input system, such as the Input System package.

## Constructors

| Constructor                                                                                                                                        | Description                                                                                                                                                                          |
| -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [AdaptivePerformanceIdleTimeTracker()](/engine/6000.7/script-reference/unityengine/adaptiveperformance/adaptiveperformanceidletimetracker/ctor.md) | Initializes a new instance of the [AdaptivePerformanceIdleTimeTracker](/engine/6000.7/script-reference/unityengine/adaptiveperformance/adaptiveperformanceidletimetracker.md) class. |

## Static Properties

| Property                                                                                                                                                 | Description                                                                                                                                                                                                                                                                                                                               |
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [IsAnyKeyPressed](/engine/6000.7/script-reference/unityengine/adaptiveperformance/adaptiveperformanceidletimetracker/isanykeypressed.md)                 | Whether any key or button (keyboard, mouse, or controller button) is currently pressed. Uses [AdaptivePerformanceIdleTimeTracker.IsAnyKeyPressedProvider](/engine/6000.7/script-reference/unityengine/adaptiveperformance/adaptiveperformanceidletimetracker/isanykeypressedprovider.md).                                                 |
| [IsAnyKeyPressedProvider](/engine/6000.7/script-reference/unityengine/adaptiveperformance/adaptiveperformanceidletimetracker/isanykeypressedprovider.md) | Provider used to determine if any key or button is pressed. The default (legacy Input.anyKey) covers keyboard keys, mouse buttons, and controller buttons. Controller analog sticks and triggers are project-defined and not detected by the default; assign a custom provider (for example, backed by the Input System) to include them. |
| [IsCursorMoving](/engine/6000.7/script-reference/unityengine/adaptiveperformance/adaptiveperformanceidletimetracker/iscursormoving.md)                   | Whether the pointer was active this frame (cursor movement or an active touch). Uses [AdaptivePerformanceIdleTimeTracker.IsCursorMovingProvider](/engine/6000.7/script-reference/unityengine/adaptiveperformance/adaptiveperformanceidletimetracker/iscursormovingprovider.md).                                                           |
| [IsCursorMovingProvider](/engine/6000.7/script-reference/unityengine/adaptiveperformance/adaptiveperformanceidletimetracker/iscursormovingprovider.md)   | Provider used to determine if the pointer was active this frame (cursor movement or an active touch). Assign to override the default (legacy Input.mousePositionDelta and Input.touchCount).                                                                                                                                              |
| [IsUserActive](/engine/6000.7/script-reference/unityengine/adaptiveperformance/adaptiveperformanceidletimetracker/isuseractive.md)                       | Whether the developer-defined activity condition reports activity this frame. Uses [AdaptivePerformanceIdleTimeTracker.IsUserActiveProvider](/engine/6000.7/script-reference/unityengine/adaptiveperformance/adaptiveperformanceidletimetracker/isuseractiveprovider.md).                                                                 |
| [IsUserActiveProvider](/engine/6000.7/script-reference/unityengine/adaptiveperformance/adaptiveperformanceidletimetracker/isuseractiveprovider.md)       | Optional developer-defined activity condition, checked in addition to key and cursor input. Return true to signal user activity from a source not covered by the built-in checks (for example, gamepad analog sticks via the Input System, or application-specific activity). Defaults to a condition that reports no activity.           |
