I am quite interested in virtual time. It has appl...
# opensavvy
a
I am quite interested in virtual time. It has applications not only in tests, but in simulation as well. As far as I can understand, you have not reimplemented virtual time, only used the implementation from kotlinx-coroutines. Am I right?
c
Yes, it's all utility classes to make it more ergonomic, but underneath it's the implementation from kotlinx-coroutines-test.
a
I see, It would be quite useful to have it as a separate library. I think I've filed this to JB YouTrack.
c
If you find the link, I'd like to follow it too.
From what I understand though, it's just the Dispatcher that's special, and you could use it without using the rest of the kotlinx-coroutines-test library (you'd still need a dependency on it)
a
Indeed, but You can't just use it outside of
runTest
I had to copy the whole construct to my project and change some things tom make it work.
Can't find the issue, maybe I forgot to file it after all...
c
It's a shame that it's a copy/paste and not a direct reuse, because then it won't work with Prepared and other similar libraries
a
Yes, I tried to reuse it, but it is tied to
runTest
and could not be used outide.
c
Ah.
a
So I had to copy and change some internals to make it work with generic coroutines
c
I wonder if it would be difficult to make it interoperate with Prepared's functions 🤔