/* * GNU AFFERO GENERAL PUBLIC LICENSE * Version 3, 19 November 2007 * Copyright (C) 2007 Free Software Foundation, Inc. * Everyone is permitted to copy and distribute verbatim copies * of this license document, but changing it is not allowed. */ using System; namespace UVtools.Core.Extensions { public static class TimeExtensions { /// /// Converts seconds to milliseconds /// /// /// /// public static float SecondsToMilliseconds(float value, byte rounding = 2) => (float)Math.Round(value * 1000f, rounding); /// /// Converts seconds to milliseconds /// /// /// public static uint SecondsToMillisecondsUint(float value) => (uint)(value * 1000f); /// /// Converts milliseconds to seconds /// /// /// /// public static float MillisecondsToSeconds(float value, byte rounding = 2) => (float)Math.Round(value / 1000f, rounding); } }