Skip to content

Commit d106b6e

Browse files
committed
Change start
1 parent 1235953 commit d106b6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

common/src/main/kotlin/com/lambda/core/TimerManager.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ object TimerManager : Loadable {
3232
val fixedTickDelta get() = (System.nanoTime() - start).mod(TICK_DELAY_NANOS).toDouble() / TICK_DELAY_NANOS
3333

3434
init {
35-
start = System.nanoTime()
3635
fixedRateTimer(
3736
daemon = true,
3837
name = "Scheduler-Lambda-Tick",
39-
initialDelay = TICK_DELAY,
38+
initialDelay = 0,
4039
period = TICK_DELAY
4140
) {
41+
if (start == 0L) start = System.nanoTime()
4242
ClientEvent.FixedTick(this).post()
4343
}
4444
}

0 commit comments

Comments
 (0)