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

Function convertTimeUnitToShortTerm

ui/src/utils/date.ts:187–195  ·  view source on GitHub ↗
(timeUnit: string)

Source from the content-addressed store, hash-verified

185};
186
187export function convertTimeUnitToShortTerm(timeUnit: string) {
188 if (timeUnit === 'microseconds') return 'μs';
189
190 const shortTimeUnit = (timeUnitToShortTermMapper as any)[timeUnit];
191
192 if (shortTimeUnit) return shortTimeUnit;
193
194 return '';
195}
196
197export function convertToTimeUnit(microseconds: number, targetTimeUnit: string) {
198 if (microseconds < 1000) {

Callers 1

timeConversionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected