|
|
|
|
|
by dheera
1063 days ago
|
|
That's ok, the bits past the low bits are just there to avoid collisions, not an actual measure of high precision time beyond the low bits. It's not worse than the hash solution, I'm just saying it's not necessary to hash it if the only objective is to reduce collisions. In fact the hashing solution, if it is replacing the low bits with a hash of low bits plus something else, is actually destroying valuable time information. |
|
The combination of multiple counters incremented by individual unsteady clocks used to be a source for pseudo random scrambler sequences; these days we prefer LFSRs, but overall this is something that can be weird.
Hence my recommendation: Just throw xxHash32 on concatenation of the HPTC's low bits and the CPU clock cycle counter, and forgo any pretense of monotony in the low bits (because very likely you don't have it anyway).