krontab/src/commonTest/kotlin/dev/inmo/krontab/utils/FailJob.kt
2020-11-21 14:58:19 +06:00

9 lines
247 B
Kotlin

package dev.inmo.krontab.utils
import kotlinx.coroutines.*
fun CoroutineScope.createFailJob(forTimeMillis: Long) = launch {
delay(forTimeMillis)
throw IllegalStateException("This job must be completed at before this exception happen")
}