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

# 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 }
```
