(in microseconds) as HH:mm:ss.SSS
   * @param {number} highResTimeStamp
   */
  formatTime(highResTimeStamp) {
    const date = new Date(highResTimeStamp / 1000);
    const hh = date
      .getHours()
      .toString()
      .padStart(2, "0");
    const mm = date
      .getMinutes()
      .toString()
      .padStart(2, "0");
    const ss = date
      .getSeconds()
      .toString()
      .padStart(2, "0");
    const mmm = date
      .getMilliseconds()
      .toString()
      .padStart(3, "0");
    return `${hh}:${mm}:${ss}.${mmm}`;
  }

  render() {
    const label = this.formatTime(this.props.item.timeStamp);

    return dom.td(
      {
        className: "ws-frames-list-column ws-frames-list-time",
        title: label,
      },
      label
    );
  }
}

module.exports = FrameListColumnTime;
PK