> ## Documentation Index
> Fetch the complete documentation index at: https://bun.zhcndoc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 以纳秒为单位获取进程运行时间

使用 `Bun.nanoseconds()` 获取 `bun` 进程存活的总纳秒数。

```ts theme={"theme":{"light":"github-light","dark":"dracula"}}
Bun.nanoseconds();
```

***

更多实用工具请参见 [文档 > API > 工具](/runtime/utils)。
