MCPcopy
hub / github.com/react-grid-layout/react-grid-layout / formatTime

Function formatTime

test/spec/benchmark-test.js:92–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90 afterAll(() => {
91 // Format time value with appropriate units
92 const formatTime = time => {
93 if (typeof time !== "number") return String(time);
94 if (time < 0.001) return `${(time * 1_000_000).toFixed(2)} ns`;
95 if (time < 1) return `${(time * 1000).toFixed(2)} µs`;
96 if (time < 1000) return `${time.toFixed(2)} ms`;
97 return `${(time / 1000).toFixed(2)} s`;
98 };
99
100 // Group benchmarks by category
101 const categories = {

Callers 1

benchmark-test.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…