> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://www.getfoundry.sh/api/mcp` to find what you need.
>
> **Have feedback?** Use `submit_feedback` on the same MCP server.

## `sleep`

### Signature

```solidity
function sleep(uint256 milliseconds) external;
```

### Description

Sleeps for a given amount of milliseconds.

### Parameters

| Parameter      | Type      | Description                      |
|----------------|-----------|----------------------------------|
| `milliseconds` | `uint256` | Duration to sleep in milliseconds |

### Examples

```solidity [test/Sleep.t.sol]
vm.sleep(10_000); // Halts execution for 10 seconds
```

### Related Cheatcodes

* [`unixTime`](/reference/cheatcodes/unix-time) - Returns the current unix timestamp in milliseconds
