24 using Guid = std::array<uint64_t, 2>;
46 static void Init(time_t t_start, uint64_t user)
56 time_t t_cur = t - _tStart;
77 static time_t _tStart;
80 static uint64_t _user;
82 static uint64_t _make()
static void Sleep(unsigned t=0)
阻塞线程毫秒数(不精确)
static time_t GetTimeStampMs()
返回时间戳(毫秒)
static void Init(time_t t_start, uint64_t user)
设置起始点时间戳(可以不调用)
constexpr uint64_t Pow64(uint64_t x, uint8_t n)
constexpr uint64_t UID_POW_2_X
时间戳占据位数能表示的上限
std::array< uint64_t, 2 > Guid
constexpr uint8_t UID_YEAR
需要支持多少年
constexpr uint8_t UID_STEP
单步生成时间(毫秒)
constexpr uint64_t UID_YEAR_SECOND_X
一年生成的数量
constexpr uint64_t UID_STEP_COUNT
单步最大数量
constexpr uint8_t UID_BIT_TIME
时间戳占据位数
constexpr uint8_t UID_BIT_USER
自定义数据位数