mirror of
https://github.com/InsanusMokrassar/krontab.git
synced 2026-05-13 10:10:02 +00:00
files replacements
This commit is contained in:
10
src/commonTest/kotlin/FailJob.kt
Normal file
10
src/commonTest/kotlin/FailJob.kt
Normal file
@@ -0,0 +1,10 @@
|
||||
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")
|
||||
}
|
||||
Reference in New Issue
Block a user