measureExecutionDuration<T>(callback): T extends Promise<any> ? Promise<Duration<DurationUnit.Milliseconds>> : Duration<DurationUnit.Milliseconds>
Measures how long (in milliseconds) the given callback takes to run to completion. By default
this is synchronous, but it will automatically switch to async and await the callback if it
returns a promise.
Measures how long (in milliseconds) the given callback takes to run to completion. By default this is synchronous, but it will automatically switch to async and await the callback if it returns a promise.