timeout

fun <T> Single<T>.timeout(timeout: Duration, scheduler: Scheduler, other: Single<T>? = null): Single<T>

Disposes the current Single if it does not signal within the timeout, and subscribes to other if provided.

Please refer to the corresponding RxJava document.