peb
Version:
Peb.js makes JS easier
16 lines (15 loc) • 797 B
Markdown
# Async Function `sleep()`
**The last updated version of this function**: *3.0.0-pre.3*
## Browser Support
| <img src="https://cdn.jsdelivr.net/gh/TechPot-Studio/svg-gallery/chrome.svg" width="30" /> | <img src="https://cdn.jsdelivr.net/gh/TechPot-Studio/svg-gallery/firefox.svg" width="30" /> | <img src="https://cdn.jsdelivr.net/gh/TechPot-Studio/svg-gallery/safari.svg" width="30" /> | <img src="https://cdn.jsdelivr.net/gh/TechPot-Studio/svg-gallery/opera.svg" width="30" /> | <img src="https://cdn.jsdelivr.net/gh/TechPot-Studio/svg-gallery/edge.svg" width="30" /> |
| :---: | :---: | :---: | :---: | :---: |
| Yes | Yes | Yes | Yes | Yes |
## Usage
```javascript
await peb.sleep(time)
peb.sleep(time).then(() => {
// TODO something
})
```
I think you are already understand
Isn't it?