feat(uuid): add optional caller provided timestamp for v7
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <cstdint>
|
||||
#include <random>
|
||||
#include <string>
|
||||
#include "cpputils/datetime.h"
|
||||
|
||||
namespace cpputils {
|
||||
namespace uuid {
|
||||
@@ -46,7 +47,8 @@ class V7 {
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
std::array<uint8_t, 16> generate();
|
||||
std::array<uint8_t, 16> generate(
|
||||
int64_t timestamp = cpputils::datetime::now());
|
||||
};
|
||||
|
||||
} // namespace uuid
|
||||
|
||||
Reference in New Issue
Block a user