代码拉取完成,页面将自动刷新
同步操作将从 OpenHarmony/interface_sdk-js 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/*
* Copyright (C) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit ArkUI
*/
/**
* Provides interfaces to monitor a scene for performance measurement.
*
* <p>These interfaces are used to monitor the begin, end, and value changes of finger processes that last for at least 3 ms.
*
* <p>Example:
* import "@ohos.arkui.performanceMonitor.d.ts"
* To start scene monitoring that is expected to complete within 5 ms:
* <pre>{@code
* performanceMonitor.begin(string, ActionType, string);
* //scene finished
* performanceMonitor.end(string);
* }</pre>
*
* <p>Each {@code begin} matches one {@code end}, and they must have the same scene id.
*
* @namespace performanceMonitor
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 10
*/
declare namespace performanceMonitor {
/**
* Enumerates the input event type.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 10
*/
export enum ActionType {
/**
* The user presses the finger on the screen.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 10
*/
LAST_DOWN = 0,
/**
* The user lifts up the finger from the screen.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 10
*/
LAST_UP = 1,
/**
* The user first moves the finger after pressing down the screen.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 10
*/
FIRST_MOVE = 2
}
/**
* Enumerates the input source type.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 12
*/
export enum SourceType {
/**
* The user touches the screen to trigger the scene.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 12
*/
PERF_TOUCH_EVENT = 0,
/**
* TThe user uses the mouse to trigger the scene.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 12
*/
PERF_MOUSE_EVENT = 1,
/**
* The user uses the touchpad to trigger the scene.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 12
*/
PERF_TOUCHPAD_EVENT = 2,
/**
* The user uses the joystick to trigger the scene.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 12
*/
PERF_JOYSTICK_EVENT = 3,
/**
* The user uses the keyboard to trigger the scene.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 12
*/
PERF_KEY_EVENT = 4
}
/**
* Begin monitoring an application scene.
*
* @param { string } scene Indicates the scene name.
* @param { ActionType } startInputType Indicates the scene input event type.
* @param { string } note Indicates the app expected info delivered.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 10
*/
function begin(scene: string, startInputType: ActionType, note?: string): void;
/**
* End monitoring an application scene.
*
* @param { string } scene Indicates the scene name. It must be the same with the {@code scene} of start.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 10
*/
function end(scene: string): void;
/**
* recordInputEventTime monitoring an application scene.
*
* @param { ActionType } type - Indicates the scene input event type.
* @param { SourceType } sourceType - Indicates the scene input source type.
* @param { number } time - Indicates the scene input time.
* @throws { BusinessError } 202 - not system application.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 12
*/
function recordInputEventTime(type: ActionType, sourceType: SourceType, time: number): void;
}
export default performanceMonitor;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。