12 lines
445 B
TypeScript
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();
|