log2trace-ui - v1.0.0-RC1
    Preparing search index...

    Function nanoToMilli

    • Convert a nanosecond timestamp string to milliseconds.

      OpenTelemetry encodes timestamps as nanoseconds since the Unix epoch in string form to preserve int64 precision. This helper narrows that value into a regular JavaScript number for use in the timeline math (Date constructors, pixel offsets, etc.). Sub-millisecond precision is discarded by integer division.

      Parameters

      • nano: string

        UNIX epoch time in nanoseconds, encoded as a decimal string.

      Returns number

      The same instant expressed in milliseconds.