queueAfter

fun queueAfter(quantity: Int, timeUnit: TimeUnit = TimeUnit.SECONDS, scope: CoroutineScope = GlobalScope, failure: (Throwable) -> Unit = { throw it }, consumer: (T) -> Unit)

Invoke supplier asynchronously immediately and invoke consumer after the specified quantity of time.

Parameters

quantity

amount of time

timeUnit

the unit that quantity is in

consumer

to be invoked with T after successful completion of supplier

Sources

(source)
Link copied to clipboard