docs: update benchmarks vs. external pools
[poolifier.git] / src / utils.ts
index 33ec019db92c46688615be01bd8a59573c0b2457..b84c4c803efe974b1dde4d8e3988465bef6d94b7 100644 (file)
@@ -1,5 +1,5 @@
 import * as os from 'node:os'
-import * as crypto from 'node:crypto'
+import { webcrypto } from 'node:crypto'
 import type {
   MeasurementStatisticsRequirements,
   WorkerChoiceStrategyOptions
@@ -254,5 +254,5 @@ export const once = (
  * @returns A number in the [0,1[ range
  */
 export const secureRandom = (): number => {
-  return crypto.getRandomValues(new Uint32Array(1))[0] / 0x100000000
+  return webcrypto.getRandomValues(new Uint32Array(1))[0] / 0x100000000
 }