---
schema_version: "1"
id: d10f4f44af046ff55735b355e2b48022adf7a5333262c7ec19383b5c91f42405
title: wait
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/latest/dw-runtime-functions-wait.md
canonical_url: https://docs.mulesoft.com/dataweave/latest/dw-runtime-functions-wait
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 64f43331269081d7eb93549545ae891c8df508bd939f6206f19c13d52a1bbfbe
description: MuleSoft Documentation Site
release: "2.13"
latest: true
---
---
product: DataWeave
version: 2.13
is-latest-version: true
---

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