diff --git a/world.go b/world.go index 7df1c3d..75afe48 100644 --- a/world.go +++ b/world.go @@ -13,7 +13,7 @@ import ( type WorldState int -type WorldId int +type WorldId = donburi.WorldId const ( Init WorldState = iota @@ -179,7 +179,6 @@ func (w *world) executeTodos() { } func (w *world) run() { for { - start := time.Now() select { case <-w.quit: // 退出信号 // 仿真退出,更新状态 @@ -196,6 +195,7 @@ func (w *world) run() { return } <-w.ticker.C + // start := time.Now() if w.state == Pause { // 暂停不更新 continue } @@ -214,7 +214,7 @@ func (w *world) run() { } else { w.times += w.speed } - dt := time.Since(start) - fmt.Println("仿真执行耗时:", dt.Milliseconds(), "ms") + // dt := time.Since(start) + // fmt.Println("仿真系统执行耗时:", dt.Milliseconds(), "ms") } }