init: 2.B

This commit is contained in:
AncTe committed 2026-02-28 20:23:34 +08:00
commit 6bf32174d8
610 files changed
+151444

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
# @motajs/common 函数
## `sleep`
```ts
function sleep(time: number): Promise<void>;
```
#### 描述
创建一个等待指定时长的异步。
#### 参数
- `time`: 等待时长
#### 使用示例
```ts
async function myFunc() {
await sleep(1000);
// 这后面的内容会在 1 秒之后执行
}
```