Partager via


HealthStats.GetTimer(Int32) Method

Definition

Return a TimerStat object for the given key.

[Android.Runtime.Register("getTimer", "(I)Landroid/os/health/TimerStat;", "GetGetTimer_IHandler", ApiSince=24)]
public virtual Android.OS.Health.TimerStat? GetTimer (int key);
[<Android.Runtime.Register("getTimer", "(I)Landroid/os/health/TimerStat;", "GetGetTimer_IHandler", ApiSince=24)>]
abstract member GetTimer : int -> Android.OS.Health.TimerStat
override this.GetTimer : int -> Android.OS.Health.TimerStat

Parameters

key
Int32

Returns

Attributes

Remarks

Return a TimerStat object for the given key.

This will allocate a new TimerStat object, which may be wasteful. Instead, use #getTimerCount and #getTimerTime.

Java documentation for android.os.health.HealthStats.getTimer(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to