mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-10-14 21:01:26 +08:00
16 lines
281 B
TypeScript
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;
|