Hello how could I make a function repeatable after...
# coroutines
o
Hello how could I make a function repeatable after a period of time using coroutines?
s
Do you want the function to repeat itself on a timer, or to filter calls faster than a certain period?
o
on a timer
o
how could i set the time period to execute after? Suppose i hav a function foo() and want to excute foo() after 40s and this call does some kind of i/o
e
create a ticker channel that will emit message after 40s and then close the channel
o
Copy code
suspend fun CoroutineScope.updateChannelList()  { 
        
}
This is the function signature that I have as of now. But the signature expected by withTimeoutOrNull is different. Can you give a sample ?
Is sending to a ticker channel only one time procedure or should it be done multiple times?