And also an `interval` function that isn’t as terr...
# multiplatform
p
And also an
interval
function that isn’t as terrible as this one I just wrote:
s
Drop the GlobalScope by changing signature to fun CoroutineScope.interval(... and then just use this.launch (this is redundant but noted to make clearer).
use val timeTaken = measureTimeMillis { block() }
swap delay and block()
use delay(period - timeTaken)