zeed
    Preparing search index...

    Function formatMilliseconds

    • Format a millisecond duration into a human readable string.

      • Values >= 1000ms are shown in seconds with one decimal (e.g. "1.2 s").
      • Smaller values are shown in milliseconds with two decimals (e.g. "123.45 ms").

      Parameters

      • ms: number

        duration in milliseconds

      Returns string

      formatted duration string