Function timeIntToArrayUnsafe

  • Converts a given time in milliseconds to an array of hours, minutes, seconds, and remaining milliseconds. This function does not perform any safety checks and assumes the input is a valid number.

    Parameters

    • ms: number

      The time in milliseconds to convert.

    Returns number[]

    An array where the first element is hours, the second is minutes, the third is seconds, and the fourth is remaining milliseconds.

    Remarks

    This function is unsafe because it does not perform any checks to ensure the input is a valid number. If the input is not a valid number, the function will return incorrect results or throw an error.

    Example

    const timeArray = timeIntToArrayUnsafe(3601000);
    console.log(timeArray); // [1, 0, 1, 0]

Generated using TypeDoc