krontab/src/commonTest/kotlin/dev/inmo/krontab/utils/FailJob.kt

9 lines
247 B
Kotlin
Raw Normal View History

2020-11-21 08:58:19 +00:00
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")
}