Sdílet prostřednictvím


Debug.ThreadCpuTimeNanos Method

Definition

Get an indication of thread CPU usage.

[Android.Runtime.Register("threadCpuTimeNanos", "()J", "")]
public static long ThreadCpuTimeNanos ();
[<Android.Runtime.Register("threadCpuTimeNanos", "()J", "")>]
static member ThreadCpuTimeNanos : unit -> int64

Returns

Attributes

Remarks

Get an indication of thread CPU usage. The value returned indicates the amount of time that the current thread has spent executing code or waiting for certain types of I/O.

The time is expressed in nanoseconds, and is only meaningful when compared to the result from an earlier call. Note that nanosecond resolution does not imply nanosecond accuracy.

On system which don't support this operation, the call returns -1.

Java documentation for android.os.Debug.threadCpuTimeNanos().

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