rewrite system with offsets

This commit is contained in:
2021-04-10 00:28:08 +06:00
parent a07027399c
commit 5844859369
13 changed files with 174 additions and 86 deletions

View File

@@ -1,6 +1,7 @@
package dev.inmo.krontab.utils
import com.soywiz.klock.DateTimeTz
import dev.inmo.krontab.KronSchedulerTz
import dev.inmo.krontab.buildSchedule
import dev.inmo.krontab.internal.offsetRange
import kotlinx.coroutines.*
@@ -84,9 +85,8 @@ class StringParseTest {
runTest {
for (i in offsetRange) {
val kronScheduler = buildSchedule("* * 10 * * ${i}o")
val kronScheduler = buildSchedule("* * 10 * * ${i}o") as KronSchedulerTz
val next = kronScheduler.next(now)
}
}
}

View File

@@ -2,6 +2,7 @@ package dev.inmo.krontab.utils
import com.soywiz.klock.*
import dev.inmo.krontab.builder.buildSchedule
import dev.inmo.krontab.next
import kotlin.test.Test
import kotlin.test.assertEquals