withTimeout

fun withTimeout(timeout: Measure<Time>): Task

Set the timeout of this task dynamically and return the task.