---
schema_version: "1"
id: 8c4f38be255ecda84b800a7e727364691dcb9c6d2c0c9609d0f0ae825fe87fae
title: wait
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.9/dw-runtime-functions-wait.md
canonical_url: https://docs.mulesoft.com/dataweave/2.9/dw-runtime-functions-wait
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 916e8067dd17c37ea214ac6436966f01c30b2a7eb83bf8fa173fbe424d2655f6
description: MuleSoft Documentation Site
release: "2.9"
latest: false
---
---
product: DataWeave
version: 2.9
---

# wait

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## wait<T>(value: T, timeout: Number): T

Stops the execution for the specified timeout period (in milliseconds).

> [!WARNING] Stopping the execution blocks the thread, potentially causing slowness, low performance
> and potentially freezing of the entire runtime. This operation is intended for limited functional
> testing purposes. Do not use this function in a production application, performance testing, or
> with multiple applications deployed.

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>value</code></p></td><td><p>Input of any type.</p></td></tr><tr><td><p><code>timeout</code></p></td><td><p>The number of milliseconds to wait.</p></td></tr></tbody></table>

### Example

This example waits 2000 milliseconds (2 seconds) to execute.

#### Source

```DataWeave
%dw 2.0
import * from dw::Runtime
output application/json
---
{ "user" : 1 } wait 2000
```

#### Output

```JSON
{ "user": 1 }
```
