delay

abstract suspend fun delay(attempt: Int, context: TContext): Duration(source)

Determines the delay between retries. If the return value is Duration.ZERO, the delay is considered to be defined externally and the default delay provider is skipped.

Parameters

attempt

the current retry attempt. Starts at 1.

context

additional context for the delay provider to determine the delay duration.