withTimeout

Returns a new Future which times out after the specified duration.

Parameters

durationMs

Timeout in milliseconds.