auto commit
This commit is contained in:
@@ -113,7 +113,7 @@ static inline int64_t CalcId(SnowFlakeWorker *worker) {
|
||||
|
||||
static inline int64_t CalcTurnBackId(SnowFlakeWorker *worker) {
|
||||
uint64_t result = (worker->_LastTimeTick << worker->_TimestampShift) | (worker->WorkerId << worker->SeqBitLength) |
|
||||
(worker->_TurnBackTimeTick);
|
||||
(worker->_TurnBackIndex);
|
||||
worker->_TurnBackTimeTick--;
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ static inline uint64_t CalcId(snowflake *flake)
|
||||
|
||||
static inline uint64_t CalcTurnBackId(snowflake *flake)
|
||||
{
|
||||
uint64_t result = (flake->_LastTimeTick << flake->_TimestampShift) + (flake->WorkerId << flake->SeqBitLength) + (flake->_TurnBackTimeTick);
|
||||
uint64_t result = (flake->_LastTimeTick << flake->_TimestampShift) + (flake->WorkerId << flake->SeqBitLength) + (flake->_TurnBackIndex );
|
||||
flake->_TurnBackTimeTick--;
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user