isn’t what I expect this to be in that case. But when in rome, I guess? Or is there a different more modern idiomatic way to cause a real closure to tick at a rate?
t
tseisel
04/03/2020, 8:20 AM
I think the most idiomatic way to do something periodically is to use coroutines. Here is an example:
Copy code
scope.launch {
while (true) {
doSomething()
delay(5000L)
}
}