refactor(ActionScheduler): remove useless delay in TimeWheel#wheel

This commit is contained in:
2026-02-09 20:02:26 +08:00
parent d47e9fbf95
commit eab3d00fe8

View File

@@ -159,10 +159,6 @@ class ActionScheduler : AgentRunningSubModule<Set<ScheduledActionData>, Void>()
// tick 推进nano -> second
val current = System.nanoTime()
val step = ((current - lastTickAdvanceTime) / 1_000_000_000L).toInt()
if (step <= 0) {
delay(50) // 避免空转
continue
}
val previousTick = tick
tick = (tick + step).coerceAtMost(wheel.lastIndex)