nitro-react/src/components/wired/common/GetWiredTimeLocale.ts

9 lines
187 B
TypeScript
Raw Normal View History

2021-06-28 18:32:06 +02:00
export function GetWiredTimeLocale(value: number): string
{
const time = Math.floor((value / 2));
if(!(value % 2)) return time.toString();
return (time + 0.5).toString();
}