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

auto commit

This commit is contained in:
yitter
2023-09-06 20:55:45 +08:00
parent 15cf09927b
commit b5ee773830
3 changed files with 3 additions and 3 deletions

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -221,7 +221,7 @@
#### 动态库下载
下载链接1https://github.com/yitter/IdGenerator/releases/download/v1.3.3/workeridgo_lib_v1.3.3.zip
下载链接https://github.com/yitter/IdGenerator/releases/download/v1.3.3/workeridgo_lib_v1.3.3.zip
#### 动态库接口定义
```