signoz/frontend/src/lib/convertIntoHr.ts
2022-04-01 15:12:30 +05:30

16 lines
281 B
TypeScript

import { SettingPeriod } from 'container/GeneralSettings';
const converIntoHr = (value: number, peroid: SettingPeriod): number => {
if (peroid === 'day') {
return value * 24;
}
if (peroid === 'hr') {
return value;
}
return value * 720;
};
export default converIntoHr;