mirror of
https://github.com/Wessel/Snowflakey.git
synced 2026-06-08 14:19:02 +02:00
9 lines
262 B
JavaScript
9 lines
262 B
JavaScript
"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;
|
|
};
|