diff options
| author | Stefan Boberg <[email protected]> | 2021-08-20 10:09:04 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-08-20 10:09:04 +0200 |
| commit | eebf3b9da9a748bbc860d1dccf882409ba9918ee (patch) | |
| tree | 58768a14ca4fa97337dea0b6f93120947ed804db | |
| parent | Cleaned up ObjectId generation and made it portable (diff) | |
| download | zen-eebf3b9da9a748bbc860d1dccf882409ba9918ee.tar.xz zen-eebf3b9da9a748bbc860d1dccf882409ba9918ee.zip | |
Updated ObjectId comment
| -rw-r--r-- | zencore/include/zencore/uid.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/zencore/include/zencore/uid.h b/zencore/include/zencore/uid.h index 7fc42293f..2e2871910 100644 --- a/zencore/include/zencore/uid.h +++ b/zencore/include/zencore/uid.h @@ -31,7 +31,7 @@ class StringBuilderBase; |----------------|----------------|----------------| MSB LSB - - Timestamp is a unsigned 32-bit value (seconds since Jan 1 1970) + - Timestamp is a unsigned 32-bit value (seconds since 00:00:00 Jan 1 2021) - Serial # is another unsigned 32-bit value which is assigned a (strong) random number at initialization time which is incremented when a new Oid is generated @@ -41,6 +41,12 @@ class StringBuilderBase; Timestamp and serial are stored in memory in such a way that they can be ordered lexicographically. I.e they are in big-endian byte order. + NOTE: The information above is only meant to explain the properties of + the identifiers. Client code should simply treat the identifier as an + opaque value and may not make any assumptions on the structure, as there + may be other ways of generating the identifiers in the future if an + application benefits. + */ struct Oid |