MCPcopy
hub / github.com/deepops-ai/deepops / timeConversion

Function timeConversion

ui/src/utils/date.ts:205–215  ·  view source on GitHub ↗
(microseconds: number)

Source from the content-addressed store, hash-verified

203}
204
205export function timeConversion(microseconds: number) {
206 if (microseconds < 1000) {
207 return `${microseconds}μs`;
208 }
209
210 const timeUnit = getSuitableTimeUnit(microseconds);
211
212 return `${moment
213 .duration(microseconds / 1000, 'ms')
214 .as(timeUnit as unitOfTime.Base)}${convertTimeUnitToShortTerm(timeUnit)}`;
215}

Callers 1

renderMethod · 0.90

Calls 2

getSuitableTimeUnitFunction · 0.85

Tested by

no test coverage detected