语言

ActivityManager.AddStartInfoTimestamp(Int32, Int64) 方法

定义

向调用 ApplicationStartInfo应用添加一个可选的开发人员提供的时间戳。

[Android.Runtime.Register("addStartInfoTimestamp", "(IJ)V", "GetAddStartInfoTimestamp_IJHandler", ApiSince=35)]
public virtual void AddStartInfoTimestamp(int key, long timestampNs);
[<Android.Runtime.Register("addStartInfoTimestamp", "(IJ)V", "GetAddStartInfoTimestamp_IJHandler", ApiSince=35)>]
abstract member AddStartInfoTimestamp : int * int64 -> unit
override this.AddStartInfoTimestamp : int * int64 -> unit

参数

key
Int32

时间戳的唯一键。 必须大于 ApplicationStartInfo#START_TIMESTAMP_RESERVED_RANGE_SYSTEM 且小于或等于 ApplicationStartInfo#START_TIMESTAMP_RESERVED_RANGE_DEVELOPER。 如果不在范围内,将如何。java.lang.IllegalArgumentException

timestampNs
Int64

要记录的事件以纳秒为单位的时钟单调时间。

特性

注解

将可选的开发人员提供的时间戳添加到调用应用的最新 ApplicationStartInfo。 这除了系统记录的时间戳之外。 注意:调用 Activity.reportFullyDrawn 后添加的任何时间戳将被丢弃。

注意:如果使用同一键调用,将覆盖现有时间戳。

Android 参考。android.app.ActivityManager.addStartInfoTimestamp

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于