View previous topic :: View next topic
|
Author |
Message |
jzhardy
Active User
Joined: 31 Oct 2006 Posts: 131 Location: brisbane
|
|
|
|
I'm looking to encode the system timestamp (down to milliseconds or better) into the fewest possible number of bits, and hoping I could cheat by pulling this info directly out of UUID4
a sample generated UUID is:
58d5e212-165b-4ca0-909b-c86b9cee0111
from the definition I get:
Code: |
Field Data Type Octet Note
#
time_low unsigned 32 0-3 The low field of the
bit integer timestamp
time_mid unsigned 16 4-5 The middle field of the
bit integer timestamp
time_hi_and_version unsigned 16 6-7 The high field of the
bit integer timestamp multiplexed
with the version number
|
which means 8 bytes. Can this be improved upon ? And what precision does this actually represent in the seconds part (ie, milliseconds or microseconds) ? |
|
Back to top |
|
|
jzhardy
Active User
Joined: 31 Oct 2006 Posts: 131 Location: brisbane
|
|
|
|
ok, from what i've since learnt, the precision on the low is in 100 nanosecond units. Pls correct me if this is incorrect.
based on that, i could probably lose 13 bits from time_low to keep within millisecond precision. |
|
Back to top |
|
|
|