feat(uuid): add optional caller provided timestamp for v7
This commit is contained in:
@@ -88,9 +88,8 @@ uint8_t V7::next_sequence(int64_t current_timestamp) {
|
||||
}
|
||||
}
|
||||
|
||||
std::array<uint8_t, 16> V7::generate() {
|
||||
std::array<uint8_t, 16> V7::generate(int64_t timestamp) {
|
||||
std::array<uint8_t, 16> uuid{};
|
||||
int64_t timestamp = cpputils::datetime::now();
|
||||
uint8_t seq = next_sequence(timestamp);
|
||||
uint64_t rand_a = random64();
|
||||
uint64_t rand_b = random64();
|
||||
|
||||
Reference in New Issue
Block a user