Added in API level 24

TimerStat

class TimerStat : Parcelable
kotlin.Any
   ↳ android.os.health.TimerStat

A TimerStat object stores a count and a time.

Summary

Inherited constants
Public constructors

Construct an empty TimerStat object with the count and time set to 0.

TimerStat(count: Int, time: Long)

Construct a TimerStat object with the supplied count and time fields.

Construct a TimerStat object reading the values from a Parcel object.

Public methods
Int

Int

Get the count for this timer.

Long

Get the time for this timer in milliseconds.

Unit
setCount(count: Int)

Set the count for this timer.

Unit
setTime(time: Long)

Set the time for this timer in milliseconds.

Unit
writeToParcel(out: Parcel, flags: Int)

Write this TimerStat object to a parcel.

Properties
static Parcelable.Creator<TimerStat!>

The CREATOR instance for use by aidl Binder interfaces.

Public constructors

TimerStat

Added in API level 24
TimerStat()

Construct an empty TimerStat object with the count and time set to 0.

TimerStat

Added in API level 24
TimerStat(
    count: Int,
    time: Long)

Construct a TimerStat object with the supplied count and time fields.

Parameters
count Int: The count
time Long: The time

TimerStat

Added in API level 24
TimerStat(in: Parcel!)

Construct a TimerStat object reading the values from a Parcel object.

Public methods

describeContents

Added in API level 24
fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

getCount

Added in API level 24
fun getCount(): Int

Get the count for this timer.

getTime

Added in API level 24
fun getTime(): Long

Get the time for this timer in milliseconds.

setCount

Added in API level 24
fun setCount(count: Int): Unit

Set the count for this timer.

setTime

Added in API level 24
fun setTime(time: Long): Unit

Set the time for this timer in milliseconds.

writeToParcel

Added in API level 24
fun writeToParcel(
    out: Parcel,
    flags: Int
): Unit

Write this TimerStat object to a parcel.

Parameters
dest The Parcel in which the object should be written. This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

Added in API level 24
static val CREATOR: Parcelable.Creator<TimerStat!>

The CREATOR instance for use by aidl Binder interfaces.