Skip to content

Most visited

Recently visited

navigation

FrameStats

public abstract class FrameStats
extends Object

java.lang.Object
   ↳ android.view.FrameStats
Known Direct Subclasses


This is the base class for frame statistics.

Summary

Constants

long UNDEFINED_TIME_NANO

Undefined time.

Public constructors

FrameStats()

Public methods

final long getEndTimeNano()

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

final int getFrameCount()

Gets the number of frames for which there is data.

final long getFramePresentedTimeNano(int index)

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

final long getRefreshPeriodNano()

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

final long getStartTimeNano()

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

Inherited methods

From class java.lang.Object

Constants

UNDEFINED_TIME_NANO

added in API level 21
long UNDEFINED_TIME_NANO

Undefined time.

Constant Value: -1 (0xffffffffffffffff)

Public constructors

FrameStats

added in API level 21
FrameStats ()

Public methods

getEndTimeNano

added in API level 21
long getEndTimeNano ()

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

Returns
long The end time in nanoseconds or UNDEFINED_TIME_NANO if there is no frame data.

getFrameCount

added in API level 21
int getFrameCount ()

Gets the number of frames for which there is data.

Returns
int The number of frames.

getFramePresentedTimeNano

added in API level 21
long getFramePresentedTimeNano (int index)

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

Parameters
index int: The frame index.
Returns
long The presented time in nanoseconds or UNDEFINED_TIME_NANO if the frame is not presented yet.

getRefreshPeriodNano

added in API level 21
long getRefreshPeriodNano ()

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

Returns
long The refresh period in nanoseconds.

getStartTimeNano

added in API level 21
long getStartTimeNano ()

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

Returns
long The start time in nanoseconds or UNDEFINED_TIME_NANO if there is no frame data.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.