refactor(api): move Clock abstraction from travel to shared
This commit is contained in:
9
apps/api/src/shared/clock.ts
Normal file
9
apps/api/src/shared/clock.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export const CLOCK = Symbol('CLOCK');
|
||||
|
||||
export interface Clock {
|
||||
now(): Date;
|
||||
}
|
||||
|
||||
export const systemClock: Clock = {
|
||||
now: () => new Date(),
|
||||
};
|
||||
Reference in New Issue
Block a user