2020-11-21 08:58:19 +00:00
|
|
|
package dev.inmo.krontab.utils
|
2020-01-13 04:34:35 +00:00
|
|
|
|
2023-03-18 06:23:53 +00:00
|
|
|
import kotlinx.coroutines.CoroutineScope
|
|
|
|
import kotlinx.coroutines.delay
|
|
|
|
import kotlinx.coroutines.launch
|
2020-01-13 04:34:35 +00:00
|
|
|
|
|
|
|
fun CoroutineScope.createFailJob(forTimeMillis: Long) = launch {
|
|
|
|
delay(forTimeMillis)
|
|
|
|
throw IllegalStateException("This job must be completed at before this exception happen")
|
|
|
|
}
|