1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 1 1 2 1 1 1 | import {TimeFactory, TimeMeasurement, Instant, setTimeFactory} from '@btilford/ts-base-core'; export class NodeTimeFactory implements TimeFactory { now(): TimeMeasurement { return new Instant(process.hrtime.bigint()); } } const nodeTimeFactory = new NodeTimeFactory(); setTimeFactory(nodeTimeFactory); export default nodeTimeFactory; |