Files
suaveplan/packages/foundation/bitpacker/bitpacker-network/src/defaults/default-clock.ts
2026-05-27 23:47:53 +01:00

12 lines
445 B
TypeScript

/**
* Single source of module-scope wall-clock reads for bitpacker-network.
*
* The genesis convention is that determinism rule (no module-scope
* `Date.now()` in implementation files) is enforced by allow-listing ONE
* factory per package. Every other module in this package reads time only
* through the injected `Clock` parameter.
*/
import type { Clock } from "@suaveplan/types";
export const defaultClock: Clock = () => Date.now();