> For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt.

# console: time() method

APISummary
`time` 方法用于启动一个计时器，您可以用来跟踪操作需要多长时间。

## 语法

```ts
time(label: string?): undefined;
```

### 参数

#### label

timer 的名称。

### 返回值

无（`undefined`）。

## 兼容性

**Compatibility Table**

**Query:** `lynx-api.global.console.time`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/lynx-api/global/console/time.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| time | Yes (3.2) | Yes (3.4) | Yes (3.2) | Yes (3.5) | Yes (3.5) | Yes |

**`time`**

start a timer

