Stay organized with collections
Save and categorize content based on your preferences.
FrameData
class FrameData
The payload for VsyncCallback
which includes frame information such as when the frame started being rendered, and multiple possible frame timelines and their information including deadline and expected present time.
Summary
Public methods
getFrameTimeNanos
open fun getFrameTimeNanos(): Long
The time in nanoseconds when the frame started being rendered.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# Choreographer.FrameData\n\nAdded in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nFrameData\n=========\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/view/Choreographer.FrameData \"View this page in Java\") \n\n```\nclass FrameData\n```\n\n|---|-------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.view.Choreographer.FrameData](#) |\n\nThe payload for [VsyncCallback](/reference/kotlin/android/view/Choreographer.VsyncCallback) which includes frame information such as when the frame started being rendered, and multiple possible frame timelines and their information including deadline and expected present time.\n\nSummary\n-------\n\n| Public methods ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|\n| open [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) | [getFrameTimeNanos](#getFrameTimeNanos())`()` The time in nanoseconds when the frame started being rendered. |\n| open [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)\\\u003c[Choreographer.FrameTimeline](/reference/kotlin/android/view/Choreographer.FrameTimeline)!\\\u003e | [getFrameTimelines](#getFrameTimelines())`()` The possible frame timelines, sorted chronologically. |\n| open [Choreographer.FrameTimeline](/reference/kotlin/android/view/Choreographer.FrameTimeline) | [getPreferredFrameTimeline](#getPreferredFrameTimeline())`()` The platform-preferred frame timeline. |\n\nPublic methods\n--------------\n\n### getFrameTimeNanos\n\nAdded in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getFrameTimeNanos(): Long\n```\n\nThe time in nanoseconds when the frame started being rendered. \n\n### getFrameTimelines\n\nAdded in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getFrameTimelines(): Array\u003cChoreographer.FrameTimeline!\u003e\n```\n\nThe possible frame timelines, sorted chronologically.\n\n| Return ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------|\n| [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)\u003c[Choreographer.FrameTimeline](/reference/kotlin/android/view/Choreographer.FrameTimeline)!\u003e | This value cannot be `null`. |\n\n### getPreferredFrameTimeline\n\nAdded in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getPreferredFrameTimeline(): Choreographer.FrameTimeline\n```\n\nThe platform-preferred frame timeline.\n\n| Return ||\n|-------------------------------------------------------------------------------------------|------------------------------|\n| [Choreographer.FrameTimeline](/reference/kotlin/android/view/Choreographer.FrameTimeline) | This value cannot be `null`. |"]]