clean up misc TimeDelta use
follow-up from https://webrtc-review.googlesource.com/c/src/+/262810
* replace Time::Millis(0) and TimeDelta::Millis(0) with ::Zero()
* drop unnecessary webrtc namespace from some TimeDeltas
* make TimeDelta do the unit conversion for stats
BUG=webrtc:13756
Change-Id: Ic60625ae0fc7959a47a6be9f5051851feaf76373
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265875
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37664}
diff --git a/pc/rtc_stats_collector.cc b/pc/rtc_stats_collector.cc
index e9bc83d..be6c23e 100644
--- a/pc/rtc_stats_collector.cc
+++ b/pc/rtc_stats_collector.cc
@@ -564,14 +564,11 @@
if (video_receiver_info.qp_sum)
inbound_video->qp_sum = *video_receiver_info.qp_sum;
inbound_video->total_decode_time =
- static_cast<double>(video_receiver_info.total_decode_time.ms()) /
- rtc::kNumMillisecsPerSec;
+ video_receiver_info.total_decode_time.seconds<double>();
inbound_video->total_processing_delay =
- static_cast<double>(video_receiver_info.total_processing_delay.ms()) /
- rtc::kNumMillisecsPerSec;
+ video_receiver_info.total_processing_delay.seconds<double>();
inbound_video->total_assembly_time =
- static_cast<double>(video_receiver_info.total_assembly_time.ms()) /
- rtc::kNumMillisecsPerSec;
+ video_receiver_info.total_assembly_time.seconds<double>();
inbound_video->frames_assembled_from_multiple_packets =
video_receiver_info.frames_assembled_from_multiple_packets;
inbound_video->total_inter_frame_delay =