1
0
mirror of synced 2025-12-15 17:48:11 +08:00

auto commit

This commit is contained in:
yitter
2022-09-15 23:08:35 +08:00
parent 5cd28244fc
commit 3b1fb32e21
11 changed files with 81 additions and 88 deletions

View File

@@ -136,16 +136,15 @@ class Genid {
if (currentTimeTick < this._LastTimeTick) {
if (this._TurnBackTimeTick < 1) {
this._TurnBackTimeTick = this._LastTimeTick - 1;
this._TurnBackIndex++;
// 每毫秒序列数的前 5 位是预留位0 用于手工新值1-4 是时间回拨次序
// 支持 4 次回拨次序(避免回拨重叠导致 ID 重复),可无限次回拨(次序循环使用)。
if (this._TurnBackIndex > 4) {
this._TurnBackIndex = 1;
}
this.BeginTurnBackAction(this._TurnBackTimeTick);
}
this._TurnBackIndex++;
// 每毫秒序列数的前 5 位是预留位0 用于手工新值1-4 是时间回拨次序
// 支持 4 次回拨次序(避免回拨重叠导致 ID 重复),可无限次回拨(次序循环使用)。
if (this._TurnBackIndex > 4) {
this._TurnBackIndex = 1;
}
return this.CalcTurnBackId(this._TurnBackTimeTick);
}