<h2 id="withinfiniteanimationframemillis">withInfiniteAnimationFrameMillis</h2>

<div class='sourceset sourceset-common'>Common</div>

```kotlin
public suspend inline fun <R> withInfiniteAnimationFrameMillis(
    crossinline onFrame: (frameTimeMillis: Long) -> R
): R
```

Like [withFrameMillis](/jetpack-compose/androidx.compose.runtime/runtime/functions/withFrameMillis), but applies the [InfiniteAnimationPolicy](/jetpack-compose/androidx.compose.ui/ui/interfaces/InfiniteAnimationPolicy) from the calling
[CoroutineContext] if there is one.