Reland "Reland "Refactor AnalyzerConfig to use Timestamps instead of microseconds.""

This reverts commit 7306c75c12e6dd70e1f1a0904b6bda347423a556.

Reason for revert: Downstream updated

Original change's description:
> Revert "Reland "Refactor AnalyzerConfig to use Timestamps instead of microseconds.""
>
> This reverts commit 7a992e21b9c3ff03aa34488a9c91fa580ca4faa6.
>
> Reason for revert: Breaks downstream build due to type change.
>
> Original change's description:
> > Reland "Refactor AnalyzerConfig to use Timestamps instead of microseconds."
> >
> > This is a reland of 43fb16921b29ecd3a2d87876dda75c575e05f66a
> >
> > Original change's description:
> > > Refactor AnalyzerConfig to use Timestamps instead of microseconds.
> > >
> > > Add optional offset-to-UTC parameter to output. This allows aligning
> > > the x-axis in the generated charts to other UTC-based logs.
> > >
> > > Bug: b/215140373
> > > Change-Id: I65bcd295718acbb8c94e363907c1abc458067bfd
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250203
> > > Reviewed-by: Kristoffer Erlandsson <kerl@google.com>
> > > Commit-Queue: Björn Terelius <terelius@webrtc.org>
> > > Cr-Commit-Position: refs/heads/main@{#35992}
> >
> > Bug: b/215140373
> > Change-Id: Id2b88cc4b8078a97275d49a617581cbbd02d2c6f
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252380
> > Reviewed-by: Kristoffer Erlandsson <kerl@google.com>
> > Commit-Queue: Björn Terelius <terelius@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#36066}
>
> Bug: b/215140373
> Change-Id: I951ac26b8176e58da18e93835f13f6b9deb6d4fa
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252443
> Auto-Submit: Björn Terelius <terelius@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36068}

Bug: b/215140373
Change-Id: Ie2b9a961d1e09dbeabeb6bfb02b43c047df69515
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252582
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Kristoffer Erlandsson <kerl@google.com>
Cr-Commit-Position: refs/heads/main@{#36079}
diff --git a/rtc_tools/rtc_event_log_visualizer/alerts.cc b/rtc_tools/rtc_event_log_visualizer/alerts.cc
index 2d1868f..c0d8784 100644
--- a/rtc_tools/rtc_event_log_visualizer/alerts.cc
+++ b/rtc_tools/rtc_event_log_visualizer/alerts.cc
@@ -79,7 +79,7 @@
 
       int64_t seq_num = seq_num_unwrapper.Unwrap(packet.header.sequenceNumber);
       if (std::abs(seq_num - last_seq_num) > kMaxSeqNumJump) {
-        Alert(seq_num_alert, config_.GetCallTimeSec(packet.log_time_us()),
+        Alert(seq_num_alert, config_.GetCallTimeSec(packet.log_time()),
               seq_num_explanation);
       }
       last_seq_num = seq_num;
@@ -89,7 +89,7 @@
       if (std::abs(capture_time - last_capture_time) >
           kTicksPerMillisec *
               (kCaptureTimeGraceMs + packet.log_time_ms() - last_log_time_ms)) {
-        Alert(capture_time_alert, config_.GetCallTimeSec(packet.log_time_us()),
+        Alert(capture_time_alert, config_.GetCallTimeSec(packet.log_time()),
               capture_time_explanation);
       }
       last_capture_time = capture_time;
@@ -140,7 +140,8 @@
     int64_t duration = timestamp - last_rtp_time.value_or(0);
     if (last_rtp_time.has_value() && duration > kMaxRtpTransmissionGap) {
       // No packet sent/received for more than 500 ms.
-      Alert(rtp_alert, config_.GetCallTimeSec(timestamp), rtp_explanation);
+      Alert(rtp_alert, config_.GetCallTimeSec(Timestamp::Micros(timestamp)),
+            rtp_explanation);
     }
     last_rtp_time.emplace(timestamp);
   }
@@ -155,7 +156,7 @@
       int64_t duration = rtcp.log_time_us() - last_rtcp_time.value_or(0);
       if (last_rtcp_time.has_value() && duration > kMaxRtcpTransmissionGap) {
         // No feedback sent/received for more than 2000 ms.
-        Alert(rtcp_alert, config_.GetCallTimeSec(rtcp.log_time_us()),
+        Alert(rtcp_alert, config_.GetCallTimeSec(rtcp.log_time()),
               rtcp_explanation);
       }
       last_rtcp_time.emplace(rtcp.log_time_us());
@@ -169,7 +170,7 @@
       int64_t duration = rtcp.log_time_us() - last_rtcp_time.value_or(0);
       if (last_rtcp_time.has_value() && duration > kMaxRtcpTransmissionGap) {
         // No feedback sent/received for more than 2000 ms.
-        Alert(rtcp_alert, config_.GetCallTimeSec(rtcp.log_time_us()),
+        Alert(rtcp_alert, config_.GetCallTimeSec(rtcp.log_time()),
               rtcp_explanation);
       }
       last_rtcp_time.emplace(rtcp.log_time_us());
@@ -189,7 +190,7 @@
 
   const int64_t segment_end_us = parsed_log.first_log_segment().stop_time_us();
 
-  int64_t first_occurrence = parsed_log.last_timestamp();
+  Timestamp first_occurrence = parsed_log.last_timestamp();
   constexpr double kMaxLossFraction = 0.05;
   // Loss feedback
   int64_t total_lost_packets = 0;
@@ -204,13 +205,14 @@
     total_lost_packets += lost_packets;
     total_expected_packets += bwe_update.expected_packets;
     if (bwe_update.fraction_lost >= 255 * kMaxLossFraction) {
-      first_occurrence = std::min(first_occurrence, bwe_update.log_time_us());
+      first_occurrence = std::min(first_occurrence, bwe_update.log_time());
     }
   }
   double avg_outgoing_loss =
       static_cast<double>(total_lost_packets) / total_expected_packets;
   if (avg_outgoing_loss > kMaxLossFraction) {
-    Alert(TriageAlertType::kOutgoingHighLoss, first_occurrence,
+    Alert(TriageAlertType::kOutgoingHighLoss,
+          config_.GetCallTimeSec(first_occurrence),
           "More than 5% of outgoing packets lost.");
   }
 }