mirror of
https://github.com/Wessel/Snowflakey.git
synced 2026-06-08 22:29:10 +02:00
Add token generation
This commit is contained in:
8
dist/lib/Snowflake/util.js
vendored
Normal file
8
dist/lib/Snowflake/util.js
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.sleep = (duration = 1) => {
|
||||
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, (duration * 1000));
|
||||
};
|
||||
exports.getBits = (bits) => {
|
||||
return (2 ** bits) - 1;
|
||||
};
|
||||
Reference in New Issue
Block a user