2
0
mirror of https://github.com/boostorg/uuid.git synced 2026-01-19 04:42:16 +00:00

Document timestamp_v7 and time_point_v7

This commit is contained in:
Peter Dimov
2024-05-11 17:14:24 +03:00
parent c091c7708e
commit ac5b30b936

View File

@@ -89,6 +89,11 @@ public:
timestamp_type timestamp_v6() const noexcept;
uuid_clock::time_point time_point_v6() const noexcept;
timestamp_type timestamp_v7() const noexcept;
std::chrono::time_point<std::chrono::system_clock, std::chrono::milliseconds>
time_point_v7() const noexcept;
clock_seq_type clock_seq() const noexcept;
node_type node_identifier() const noexcept;
@@ -245,6 +250,20 @@ uuid_clock::time_point time_point_v6() const noexcept;
Returns: :: The timestamp of a version 6 UUID, expressed as a `<chrono>` `time_point`.
```
timestamp_type timestamp_v7() const noexcept;
```
Returns: :: The UUIDv7 timestamp (number of milliseconds since the Unix epoch - midnight 1 Jan 1970 UTC).
The value is only meaningful for version 7 UUIDs.
```
std::chrono::time_point<std::chrono::system_clock, std::chrono::milliseconds>
time_point_v7() const noexcept;
```
Returns: :: The timestamp of a version 7 UUID, expressed as a `<chrono>` `time_point`.
```
clock_seq_type clock_seq() const noexcept;
```