Code coverage report for node/src/time/node-time-factory.ts

Statements: 100% (6 / 6)      Branches: 100% (0 / 0)      Functions: 100% (1 / 1)      Lines: 100% (6 / 6)      Ignored: none     

All files » node/src/time/ » node-time-factory.ts
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 161     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;