()
| 37 | const START_TIME = new Date('2024-01-01 00:00:00 UTC').valueOf(); |
| 38 | |
| 39 | export const getTimeFunctions = (): [ |
| 40 | reset: () => void, |
| 41 | getNow: () => number, |
| 42 | pause: (ms?: number) => Promise<void>, |
| 43 | ] => { |
| 44 | let time = 0; |
| 45 | return [ |
| 46 | () => (time = START_TIME), |
| 47 | () => time, |
| 48 | async (ms = 50): Promise<void> => { |
| 49 | time += ms; |
| 50 | return pause(ms); |
| 51 | }, |
| 52 | ]; |
| 53 | }; |
| 54 | |
| 55 | export const time = (offset: number, counter: number, storeId: string = 's1') => |
| 56 | encodeHlc(START_TIME + offset, counter, STORE_ID_HASHES[storeId]); |
no test coverage detected
searching dependent graphs…