advanceTimeUntil

abstract suspend fun advanceTimeUntil(timeout: Duration = 1.seconds, condition: () -> Boolean)

Sends frames, one at a time, until condition returns true.

Parameters

timeout

the composition time this may spend, one second by default.

condition

checked before the first frame and again after each one, on the calling thread.

Throws

if condition is still not met once currentTime has advanced by timeout.