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

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