Getting started Community Training Tutorials Documentation APIs, AI & Tools
%dw 2.0
output application/json
fun myFunction() = dw::Runtime::wait("My result",100)
---
dw::util::Timer::duration(() -> myFunction())
You're viewing an older version of the documentation. You can switch to the latest version or use the version selector in the left navigation.
Executes the input function and returns an object with execution time in milliseconds and result of that function.
This example passes a wait function (defined in the header), which returns
the execution time and result of that function in a DurationMeasurement
object.