> For the complete documentation index, see [llms.txt](https://ubtechedu.gitbook.io/chinese/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ubtechedu.gitbook.io/chinese/arduino-language/functions/communication/settimeout.md).

# Serial.setTimeout(time)

设置使用Serial.readBytesUntil() 或Serial.readBytes()时等待串口数据的最大毫秒值. 默认为1000毫秒

### 参数

| 参数名  | 描述                 |
| ---- | ------------------ |
| time | 以毫秒为单位的超时时间（long）。 |
