From 1068ffe211aaac966410086dc9b85ef8241de22a Mon Sep 17 00:00:00 2001 From: ningning Date: Mon, 31 Jul 2023 07:07:59 +0000 Subject: [PATCH] update zh-cn/application-dev/reference/apis/js-apis-system-timer.md. Signed-off-by: ningning --- .../reference/apis/js-apis-system-timer.md | 24 ++++--------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-system-timer.md b/zh-cn/application-dev/reference/apis/js-apis-system-timer.md index 26c21d546e..4e2190563a 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-system-timer.md +++ b/zh-cn/application-dev/reference/apis/js-apis-system-timer.md @@ -36,8 +36,8 @@ import systemTimer from '@ohos.systemTimer'; | 名称 | 类型 | 必填 | 说明 | | --------- | --------------------------------------------- | ---- | ------------------------------------------------------------ | | type | number | 是 | 定时器类型。
取值为1,表示为系统启动时间定时器(定时器启动时间不能晚于当前设置的系统时间) ;
取值为2,表示为唤醒定时器;
取值为4,表示为精准定时器;
取值为8,表示为IDLE模式定时器(暂不支持)。 | -| repeat | boolean | 是 | true为循环定时器,false为单次定时器。 | -| interval | number | 否 | 如果是循环定时器,repeat值应大于5000毫秒,非重复定时器置为0。 | +| repeat | boolean | 是 | 是否为循环定时器。
true为循环定时器,false为单次定时器。 | +| interval | number | 否 |定时器时间间隔。
如果是循环定时器,interval值应大于5000毫秒;单次定时器interval值为0。 | | wantAgent | [WantAgent](js-apis-app-ability-wantAgent.md) | 否 | 设置通知的WantAgent,定时器到期后通知。(支持拉起应用MainAbility,暂不支持拉起ServiceAbility。) | | callback | number | 是 | 以回调函数的形式返回定时器的ID。 | @@ -48,8 +48,6 @@ createTimer(options: TimerOptions, callback: AsyncCallback<number>): void 创建定时器,使用callback异步回调。 -**系统接口:** 此接口为系统接口 - **系统能力:** SystemCapability.MiscServices.Time **参数:** @@ -89,8 +87,6 @@ createTimer(options: TimerOptions): Promise<number> 创建定时器,使用Promise异步回调。 -**系统接口:** 此接口为系统接口 - **系统能力:** SystemCapability.MiscServices.Time **参数:** @@ -131,9 +127,7 @@ export default { startTimer(timer: number, triggerTime: number, callback: AsyncCallback<void>): void -开始定时器,使用callback异步回调。 - -**系统接口:** 此接口为系统接口 +开启定时器,使用callback异步回调。 **系统能力:** SystemCapability.MiscServices.Time @@ -176,9 +170,7 @@ export default { startTimer(timer: number, triggerTime: number): Promise<void> -开始定时器,使用Promise异步回调。 - -**系统接口:** 此接口为系统接口 +开启定时器,使用Promise异步回调。 **系统能力:** SystemCapability.MiscServices.Time @@ -226,8 +218,6 @@ stopTimer(timer: number, callback: AsyncCallback<void>): void 停止定时器,使用callback异步回调。 -**系统接口:** 此接口为系统接口 - **系统能力:** SystemCapability.MiscServices.Time **参数:** @@ -271,8 +261,6 @@ stopTimer(timer: number): Promise<void> 停止定时器,使用Promise异步回调。 -**系统接口:** 此接口为系统接口 - **系统能力:** SystemCapability.MiscServices.Time **参数:** @@ -319,8 +307,6 @@ destroyTimer(timer: number, callback: AsyncCallback<void>): void 销毁定时器,使用callback异步回调。 -**系统接口:** 此接口为系统接口 - **系统能力:** SystemCapability.MiscServices.Time **参数:** @@ -365,8 +351,6 @@ destroyTimer(timer: number): Promise<void> 销毁定时器,使用Promise异步回调。 -**系统接口:** 此接口为系统接口 - **系统能力:** SystemCapability.MiscServices.Time **参数:** -- GitLab