> For the complete documentation index, see [llms.txt](https://arduino.doc.skyone.host/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://arduino.doc.skyone.host/core/time/delay.md).

# delay

## 函数原型

```cpp
void delay(unsigned long ms);
```

## 作用

是程序停止执行一段时间，就像 Windows 下 C 中的 `sleep()`

## 参数

* `ms`

  如你所加，程序暂停的时间，单位**毫秒**

## 示例

```cpp
delay(1000);    // 延时 1 秒
delay(333);     // 延时 333 毫秒
```
