Anybody know how to implement “timer” analog in mu...
# multiplatform
e
Anybody know how to implement “timer” analog in multiplatform library?
ticker
(from kotlinx.coroutines.channels) are ony JVM based, and according to this https://github.com/Kotlin/kotlinx.coroutines/issues/540 I don’t see that they will be multiplatform
h
I hacked together something like this, but it has a lot of quirks and is not ready to be published. Especially because in my usecase it was beneficial to synchronize the execution to the wallclock time (i.e. if you tick every second, do it while also the system time switches to the next second)
Where is your problem rolling your own solution? The issue you came from already has an example
e
Yes, I have implemented solution from here https://github.com/Kotlin/kotlinx.coroutines/issues/1186 not sure that it’s a best decision. I think “ticker” or “tickerFlow” would be better alternative, but not sure will it be implemented as multiplatform soultion