WaitResult

sealed class WaitResult<out T>(source)

The result of a wait for one thing with a time limit: either the thing happened, and its value is available, or the time ran out first.

Type Parameters

T

the type of the value of the thing waited for

Inheritors

Constructors

Link copied to clipboard
protected constructor()

Types

Link copied to clipboard
class Satisfied<T>(value: T, val timeWaited: Double) : WaitResult<T>

The thing waited for happened before the time limit.

Link copied to clipboard
class TimedOut(val timeWaited: Double) : WaitResult<Nothing>

The time limit ran out before the thing waited for happened.

Properties

Link copied to clipboard

True if the time limit ran out before the thing waited for happened.

Link copied to clipboard
abstract val timeWaited: Double

The simulated time from the start of the wait to its end.

Link copied to clipboard
val value: T

The value of the thing waited for.

Functions

Link copied to clipboard
fun valueOrNull(): T?

The value of the thing waited for, or null if the wait timed out.