X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fworker%2FWorkerUtils.ts;h=776d7174c664f24a8d1e8bcb8ab59b5d3ee5706b;hb=6a4032b5d8f3cbaa18d3beddcdfe9d335c1cba90;hp=1874767370a1a5d438993fd6ec2dba1b9f1318d1;hpb=8664faa4267611c6f15a5e0d7cd77c6ba72eb7ce;p=e-mobility-charging-stations-simulator.git diff --git a/src/worker/WorkerUtils.ts b/src/worker/WorkerUtils.ts index 18747673..776d7174 100644 --- a/src/worker/WorkerUtils.ts +++ b/src/worker/WorkerUtils.ts @@ -1,4 +1,4 @@ -import { webcrypto } from 'node:crypto'; +import { getRandomValues } from 'node:crypto'; import chalk from 'chalk'; @@ -34,5 +34,5 @@ export const randomizeDelay = (delay: number): number => { * @internal */ const secureRandom = (): number => { - return webcrypto.getRandomValues(new Uint32Array(1))[0] / 0x100000000; + return getRandomValues(new Uint32Array(1))[0] / 0x100000000; };