注销耗时计算日志打印

修改EntityId定义
This commit is contained in:
walker 2023-10-09 15:03:26 +08:00
parent 0d24ef1dc2
commit e7be64a2f9
1 changed files with 4 additions and 4 deletions

View File

@ -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")
}
}