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}
This commit is contained in:
Philipp Hancke
2022-07-08 18:43:25 +02:00
committed by WebRTC LUCI CQ
parent 175d77ce77
commit a204ad210d
23 changed files with 155 additions and 162 deletions

View File

@ -195,7 +195,7 @@ TEST(RepeatingTaskTest, CompensatesForLongRunTime) {
}
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, Example) {
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)