Most visited

Recently visited

Added in API level 24

CpuUsageInfo

public final class CpuUsageInfo
extends Object implements Parcelable

java.lang.Object
    android.os.CpuUsageInfo


每个核心的CPU使用率信息。

摘要(Summary)

Inherited constants

From interface android.os.Parcelable

Fields

public static final Creator<CpuUsageInfo> CREATOR

公共方法(Public methods)

int describeContents()

描述此Parcelable实例的封送表示中包含的特殊对象的种类。

long getActive()

获取自系统上次引导以来的活动时间(以毫秒为单位)。

long getTotal()

获取自上次引导系统以来CPU已启用的总时间(以毫秒为单位)。

void writeToParcel(Parcel out, int flags)

将此对象平铺到一个包裹中。

继承方法(Inherited methods)

From class java.lang.Object
From interface android.os.Parcelable

Fields

CREATOR

Added in API level 24
Creator<CpuUsageInfo> CREATOR

公共方法(Public methods)

describeContents

Added in API level 24
int describeContents ()

描述此Parcelable实例的封送表示中包含的特殊对象的种类。 例如,如果对象将在writeToParcel(Parcel, int)的输出中包含writeToParcel(Parcel, int) ,则此方法的返回值必须包含CONTENTS_FILE_DESCRIPTOR位。

返回(Returns)
int a bitmask indicating the set of special object types marshaled by this Parcelable object instance.

getActive

Added in API level 24
long getActive ()

获取自系统上次引导以来的活动时间(以毫秒为单位)。

返回(Returns)
long Active time in milliseconds.

getTotal

Added in API level 24
long getTotal ()

获取自上次引导系统以来CPU已启用的总时间(以毫秒为单位)。 这包括CPU闲置的时间。

返回(Returns)
long Total time in milliseconds.

writeToParcel

Added in API level 24
void writeToParcel (Parcel out, 
                int flags)

将此对象平铺到一个包裹中。

参数(Parameters)
out Parcel: The Parcel in which the object should be written.
flags int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.

Hooray!