setTimeout

open fun setTimeout(timeout: Long, timeoutUnit: TimeUnit): EventWaiterBuilder<T>(source)

Sets the timeout for this event waiter; the action will no longer be usable after the time has elapsed.

Return

This builder for chaining convenience

Parameters

timeout

Amount of time before the timeout occurs

timeoutUnit

Unit of time for the timeout (minutes / seconds / millis...)

Throws

If the timeout is not positive


abstract fun setTimeout(timeout: Duration): EventWaiterBuilder<T>(source)

Sets the timeout for this event waiter; the action will no longer be usable after the time has elapsed.

Return

This builder for chaining convenience

Parameters

timeout

Amount of time before the timeout occurs

Throws

If the timeout is not positive