interval

fun interval(initialDelay: Duration, period: Duration): Flow<Long>(source)

Returns a Flow that emits a 0L after the initialDelay and ever-increasing numbers after each period of time thereafter.

Parameters

initialDelay

must be greater than or equal to Duration.ZERO

period

must be greater than or equal to Duration.ZERO


fun interval(initialDelayMillis: Long, periodMillis: Long): Flow<Long>(source)

Returns a Flow that emits a 0L after the initialDelayMillis and ever-increasing numbers after each periodMillis of time thereafter.

Parameters

initialDelayMillis

must be non-negative

periodMillis

must be non-negative