MCPcopy Create free account
hub / github.com/thetarnav/solid-devtools / makeTimeMeter

Function makeTimeMeter

packages/logger/src/utils.ts:25–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23 * For measuring the time elapsed. Returns a function that will return the time elapsed since it's last call.
24 * */
25export 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
35export function getDiffMap<T extends object>(
36 from: readonly T[],

Callers 1

debugComputationFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…