%dw 2.0
import * from dw::Runtime
output application/json
---
{ "user" : 1 } wait 2000
DataWeave
wait
wait<T>(value: T, timeout: Number): T
Stops the execution for the specified timeout period (in milliseconds).
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
Name | Description |
---|---|
|
Input of any type. |
|
The number of milliseconds to wait. |
Example
This example waits 2000 milliseconds (2 seconds) to execute.
Source
Output
{ "user": 1 }
JSON