TimerStat

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

A TimerStat object stores a count and a time.
Requires API level 24 (Android 7.0, Nougat)

Summary

Inherited constants
Public constructors

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

<init>(count: Int, time: Long)

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

<init>(in: Parcel!)

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

Public methods
Unit
writeToParcel(out: Parcel!, flags: Int)

Write this TimerStat object to a parcel.

Unit
setCount(count: Int)

Set the count for this timer.

Long

Get the time for this timer in milliseconds.

Int


Requires API level 24 (Android 7.0, Nougat)

Int

Get the count for this timer.

Unit
setTime(time: Long)

Set the time for this timer in milliseconds.

Properties
static Parcelable.Creator<TimerStat!>!

The CREATOR instance for use by aidl Binder interfaces.

Public constructors

<init>

TimerStat()

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

<init>

TimerStat(count: Int, time: Long)

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

Parameters
count Int: The count
time Int: The time

<init>

TimerStat(in: Parcel!)

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

Public methods

writeToParcel

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

Write this TimerStat object to a parcel.
Requires API level 24 (Android 7.0, Nougat)

Parameters
dest Parcel!: The Parcel in which the object should be written.
flags Parcel!: 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

setCount

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

Set the count for this timer.
Requires API level 24 (Android 7.0, Nougat)

getTime

added in API level 24
fun getTime(): Long

Get the time for this timer in milliseconds.
Requires API level 24 (Android 7.0, Nougat)

describeContents

added in API level 24
fun describeContents(): Int


Requires API level 24 (Android 7.0, Nougat)

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.
Requires API level 24 (Android 7.0, Nougat)

setTime

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

Set the time for this timer in milliseconds.
Requires API level 24 (Android 7.0, Nougat)

Properties

CREATOR

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

The CREATOR instance for use by aidl Binder interfaces.
Requires API level 24 (Android 7.0, Nougat)