https://kotlinlang.org logo
#coroutines
Title
# coroutines
r

Rômero Ricardo

03/19/2020, 4:03 AM
Hi folks, Can any of you show me what's the recomended way of scheduling a (async) task to happen in X minutes from current time? If possible in such a way that I can control executors. Thanks in advance.
o

octylFractal

03/19/2020, 4:05 AM
Copy code
yourScopeWithDispatcher.launch {
    delay(<x minutes in millis>) // this can also take a Duration but that's experimental iirc
    // do task here
}
2 Views