queueAfter

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

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