Added in API level 21

FrameStats


abstract class FrameStats
kotlin.Any
   ↳ android.view.FrameStats

This is the base class for frame statistics.

Summary

Constants
static Long

Undefined time.

Public constructors

Public methods
Long

Gets the end time of the interval for which these statistics apply.

Int

Gets the number of frames for which there is data.

Long

Get the time a frame at a given index was presented.

Long

Gets the refresh period of the display hosting the window(s) for which these statistics apply.

Long

Gets the start time of the interval for which these statistics apply.

Constants

UNDEFINED_TIME_NANO

Added in API level 21
static val UNDEFINED_TIME_NANO: Long

Undefined time.

Value: -1L

Public constructors

FrameStats

FrameStats()

Public methods

getEndTimeNano

Added in API level 21
fun getEndTimeNano(): Long

Gets the end time of the interval for which these statistics apply. The end interval is the time when the last frame was presented.

Return
Long The end time in nanoseconds or UNDEFINED_TIME_NANO if there is no frame data.

getFrameCount

Added in API level 21
fun getFrameCount(): Int

Gets the number of frames for which there is data.

Return
Int The number of frames.

getFramePresentedTimeNano

Added in API level 21
fun getFramePresentedTimeNano(index: Int): Long

Get the time a frame at a given index was presented.

Parameters
index Int: The frame index.
Return
Long The presented time in nanoseconds or UNDEFINED_TIME_NANO if the frame is not presented yet.

getRefreshPeriodNano

Added in API level 21
fun getRefreshPeriodNano(): Long

Gets the refresh period of the display hosting the window(s) for which these statistics apply.

Return
Long The refresh period in nanoseconds.

getStartTimeNano

Added in API level 21
fun getStartTimeNano(): Long

Gets the start time of the interval for which these statistics apply. The start interval is the time when the first frame was presented.

Return
Long The start time in nanoseconds or UNDEFINED_TIME_NANO if there is no frame data.