PowLimiter

@Serializable
data class PowLimiter(minAwaitTime: MilliSeconds = 0, maxAwaitTime: MilliSeconds = 10000, powValue: Double = 4.0, powK: Double = 1.6, scope: CoroutineScope = CoroutineScope(Dispatchers.Default)) : RequestLimiter

Constructors

Link copied to clipboard
fun PowLimiter(minAwaitTime: MilliSeconds = 0, maxAwaitTime: MilliSeconds = 10000, powValue: Double = 4.0, powK: Double = 1.6, scope: CoroutineScope = CoroutineScope(Dispatchers.Default))

Functions

Link copied to clipboard
open suspend override fun <T> limit(block: suspend () -> T): T

Use limit for working of block (like delay between or after, for example)

open suspend fun <T : Any> limit(request: Request<T>, block: suspend () -> T): T