runOnce

fun runOnce(block: () -> Unit): Boolean

Runs block if no block has run since construction or the last reset, and returns true only for that first call.

The flag is set before block is invoked; if block throws, the exception propagates and the flag stays set.