From c562a0acc4278d5f136dda9a2d9315cd4cf47efb Mon Sep 17 00:00:00 2001 From: link <18727210873@163.com> Date: Thu, 26 Jun 2025 13:07:47 +0000 Subject: [PATCH] =?UTF-8?q?update=20zh-cn/application-dev/reference/apis-a?= =?UTF-8?q?rkui/js-apis-arkui-performancemonitor-sys.md.=20perfmonitor?= =?UTF-8?q?=E8=B5=84=E6=96=99=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: link <18727210873@163.com> --- .../apis-arkui/js-apis-arkui-performancemonitor-sys.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zh-cn/application-dev/reference/apis-arkui/js-apis-arkui-performancemonitor-sys.md b/zh-cn/application-dev/reference/apis-arkui/js-apis-arkui-performancemonitor-sys.md index e11ae5a29d0..33cf272c9f2 100644 --- a/zh-cn/application-dev/reference/apis-arkui/js-apis-arkui-performancemonitor-sys.md +++ b/zh-cn/application-dev/reference/apis-arkui/js-apis-arkui-performancemonitor-sys.md @@ -102,7 +102,7 @@ recordInputEventTime(type: ActionType, sourceType: sourceType, time: number): vo | -- | -- | -- | -- | | type | [ActionType](#actiontype)| 是 | 用户场景触发模式。 | | sourceType | [SourceType](#sourcetype12) | 是 | 用户场景触发源。 | -| time | number | 是 | 场景触发时间。 | +| time | number | 是 | 场景触发时间(ms)。 | **错误码:** @@ -118,10 +118,13 @@ recordInputEventTime(type: ActionType, sourceType: sourceType, time: number): vo import { systemDateTime, BusinessError } from '@kit.BasicServicesKit'; import { performanceMonitor } from '@kit.ArkUI'; +// 获取当前系统时间 let time = systemDateTime.getTime(false); try { + // 更新用户触发事件类型与时间 performanceMonitor.recordInputEventTime(performanceMonitor.ActionType.LAST_UP, performanceMonitor.SourceType.PERF_MOUSE_EVENT, time); } catch (paramError) { + // 异常处理 let code: number = (paramError as BusinessError).code; let message: string = (paramError as BusinessError).message; console.error(`error.code: ${code}, error.message: ${message}`); -- Gitee