1
0
mirror of synced 2025-12-14 00:58:09 +08:00

auto commit

This commit is contained in:
yitter
2021-04-03 00:41:24 +08:00
parent 5f898a6954
commit c44ba174d0
6 changed files with 17 additions and 9 deletions

View File

@@ -152,19 +152,22 @@ func (m1 *SnowWorkerM1) NextNormalId() uint64 {
m1.BeginTurnBackAction(m1._TurnBackTimeTick)
}
time.Sleep(time.Duration(1) * time.Millisecond)
// time.Sleep(time.Duration(1) * time.Millisecond)
return m1.CalcTurnBackId(m1._TurnBackTimeTick)
}
// 时间追平时_TurnBackTimeTick清零
if m1._TurnBackTimeTick > 0 {
m1.EndTurnBackAction(m1._TurnBackTimeTick)
m1._TurnBackTimeTick = 0
}
if currentTimeTick > m1._LastTimeTick {
m1._LastTimeTick = currentTimeTick
m1._CurrentSeqNumber = m1.MinSeqNumber
return m1.CalcId(m1._LastTimeTick)
}
if m1._CurrentSeqNumber > m1.MaxSeqNumber {
m1.BeginOverCostAction(currentTimeTick)
m1._TermIndex++