()
| 23 | * For measuring the time elapsed. Returns a function that will return the time elapsed since it's last call. |
| 24 | * */ |
| 25 | export function makeTimeMeter(): () => number { |
| 26 | let last = performance.now() |
| 27 | return () => { |
| 28 | const now = performance.now() |
| 29 | const diff = now - last |
| 30 | last = now |
| 31 | return Math.round(diff) |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | export function getDiffMap<T extends object>( |
| 36 | from: readonly T[], |
no outgoing calls
no test coverage detected
searching dependent graphs…