snowflake
snowflake copied to clipboard
Modified the generated bitstring to conform to the specifications of snowflake
The ID that is finally generated is 64 bits, but the ID generated in the process is time stamp (41 bits) machine ID (12 bits) sequence (12 bits) = 63 bits, with a leading zero. :smile: (I don't know scala well, but when I look at the source code, it looks like this. )