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

Function formatTime

test/spec/fast-compactor-test.js:169–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167 afterAll(() => {
168 // Format time value
169 const formatTime = time => {
170 if (time < 0.001) return `${(time * 1_000_000).toFixed(2)} ns`;
171 if (time < 1) return `${(time * 1000).toFixed(2)} µs`;
172 if (time < 1000) return `${time.toFixed(2)} ms`;
173 return `${(time / 1000).toFixed(2)} s`;
174 };
175
176 const lines = [
177 "",

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…