Update src/types/utils/snowflake.rs

Co-authored-by: SpecificProtagonist <specificprotagonist@posteo.org>
This commit is contained in:
kozabrada123 2023-07-29 16:06:49 +00:00 committed by GitHub
parent e64233e6d8
commit 0f300cfb20
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ const EPOCH: i64 = 1420070400000;
pub struct Snowflake(u64);
impl Snowflake {
/// Generates a snowflake for the current epoch.
/// Generates a snowflake for the current timestamp, with worker id 0 and process id 1.
pub fn generate() -> Self {
const WORKER_ID: u64 = 0;
const PROCESS_ID: u64 = 1;