mirror of
https://github.com/InsanusMokrassar/krontab.git
synced 2024-11-17 05:43:54 +00:00
11 lines
325 B
Kotlin
11 lines
325 B
Kotlin
package dev.inmo.krontab.utils
|
|
|
|
import kotlinx.coroutines.CoroutineScope
|
|
import kotlinx.coroutines.delay
|
|
import kotlinx.coroutines.launch
|
|
|
|
fun CoroutineScope.createFailJob(forTimeMillis: Long) = launch {
|
|
delay(forTimeMillis)
|
|
throw IllegalStateException("This job must be completed at before this exception happen")
|
|
}
|