提交 8df0ea2d 编写于 作者: 廖康康

update

Signed-off-by: N廖康康 <liaokangkang@huawei.com>
上级 0fa717c1
...@@ -33,7 +33,7 @@ import backgroundTaskManager from '@ohos.backgroundTaskManager'; ...@@ -33,7 +33,7 @@ import backgroundTaskManager from '@ohos.backgroundTaskManager';
``` ```
import backgroundTaskManager from '@ohos.backgroundTaskManager'; import backgroundTaskManager from '@ohos.backgroundTaskManager';
let myReason = 'test requestSuspendDelay'; let myReason = 'test requestSuspendDelay';
let delayInfo = backgroundTaskManager.requestSuspendDelay(myReason, (val) => { let delayInfo = backgroundTaskManager.requestSuspendDelay(myReason, () => {
console.info("Request suspend delay will time out."); console.info("Request suspend delay will time out.");
}); });
var id = delayInfo.requestId;console.info("requestId is: " + id); var id = delayInfo.requestId;console.info("requestId is: " + id);
...@@ -60,7 +60,7 @@ import backgroundTaskManager from '@ohos.backgroundTaskManager'; ...@@ -60,7 +60,7 @@ import backgroundTaskManager from '@ohos.backgroundTaskManager';
import backgroundTaskManager from '@ohos.backgroundTaskManager'; import backgroundTaskManager from '@ohos.backgroundTaskManager';
let myReason = 'test requestSuspendDelay'; let myReason = 'test requestSuspendDelay';
// 申请延迟挂起 // 申请延迟挂起
let delayInfo = backgroundTaskManager.requestSuspendDelay(myReason, (val) => { let delayInfo = backgroundTaskManager.requestSuspendDelay(myReason, () => {
console.info("Request suspend delay will time out."); console.info("Request suspend delay will time out.");
}); });
// 打印延迟挂起信息 // 打印延迟挂起信息
......
...@@ -38,7 +38,7 @@ requestSuspendDelay(reason: string, callback: Callback&lt;void&gt;): DelaySuspen ...@@ -38,7 +38,7 @@ requestSuspendDelay(reason: string, callback: Callback&lt;void&gt;): DelaySuspen
- **示例** - **示例**
``` ```
let myReason = 'test requestSuspendDelay'; let myReason = 'test requestSuspendDelay';
let delayInfo = backgroundTaskManager.requestSuspendDelay(myReason, (val) => { let delayInfo = backgroundTaskManager.requestSuspendDelay(myReason, () => {
console.info("Request suspend delay will time out."); console.info("Request suspend delay will time out.");
}) })
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册