pub fn generate_snowflake() -> u64
Expand description

Generates a “Snowflake ID”. Since there are already variations, this doesn’t bother being exactly the same as Twitter’s or Mastodon’s, but the idea is the same. 48 bits for time, 8 bits rerolled for each process, 8 bits from a sequence number.