commonMain.ovh.plrapps.mapcompose.utils.ApiUtils.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mapcompose-mp-desktop Show documentation
Show all versions of mapcompose-mp-desktop Show documentation
A Compose Multiplatform library to display tiled maps, with support for markers, paths, and rotation
The newest version!
package ovh.plrapps.mapcompose.utils
import kotlinx.coroutines.delay
internal suspend fun withRetry(maxRetry: Int, intervalMs: Long, block: suspend () -> Boolean) {
var cnt = 0
var res = block()
while (!res && cnt < maxRetry) {
delay(intervalMs)
res = block()
cnt++
}
}