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/rtc_base/task_utils/repeating_task_unittest.cc b/rtc_base/task_utils/repeating_task_unittest.cc
index 4cb6816..021c51e 100644
--- a/rtc_base/task_utils/repeating_task_unittest.cc
+++ b/rtc_base/task_utils/repeating_task_unittest.cc
@@ -195,7 +195,7 @@
}
TEST(RepeatingTaskTest, CompensatesForShortRunTime) {
- SimulatedClock clock(Timestamp::Millis(0));
+ SimulatedClock clock(Timestamp::Zero());
FakeTaskQueue task_queue(&clock);
std::atomic_int counter(0);
RepeatingTaskHandle::Start(
@@ -336,7 +336,7 @@
TEST(RepeatingTaskTest, ClockIntegration) {
absl::AnyInvocable<void() &&> delayed_task;
TimeDelta expected_delay = TimeDelta::Zero();
- SimulatedClock clock(Timestamp::Millis(0));
+ SimulatedClock clock(Timestamp::Zero());
NiceMock<MockTaskQueue> task_queue;
ON_CALL(task_queue, PostDelayedTask)