mirror of
https://github.com/InsanusMokrassar/krontab.git
synced 2024-11-22 16:23:55 +00:00
small optimization of Executes
This commit is contained in:
parent
25901b7ab6
commit
69e2e10d29
@ -5,7 +5,7 @@ import kotlinx.coroutines.delay
|
|||||||
|
|
||||||
suspend inline fun KronScheduler.doWhile(noinline block: suspend () -> Boolean) {
|
suspend inline fun KronScheduler.doWhile(noinline block: suspend () -> Boolean) {
|
||||||
do {
|
do {
|
||||||
delay(next().unixMillisLong - DateTime.now().unixMillisLong)
|
delay((next() - DateTime.now()).millisecondsLong)
|
||||||
} while (block())
|
} while (block())
|
||||||
}
|
}
|
||||||
suspend inline fun doWhile(
|
suspend inline fun doWhile(
|
||||||
|
Loading…
Reference in New Issue
Block a user