Hello, I'm trying for test purposes to add latency...
# arrow
k
Hello, I'm trying for test purposes to add latency inside my
IO
. What's the correct way to do it? I can't directly call delay, as I'm
not called from a coroutine or another suspend function
. Here's a simplified version of what I'm trying to achieve:
Copy code
defer(<http://Dispatchers.IO|Dispatchers.IO>) { delay(15); IO { delayedExecution() } }