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

@ -497,8 +497,8 @@ TEST_P(RtpRtcpImpl2Test, RttForReceiverOnly) {
TEST_P(RtpRtcpImpl2Test, NoSrBeforeMedia) {
// Ignore fake transport delays in this test.
sender_.transport_.SimulateNetworkDelay(TimeDelta::Millis(0));
receiver_.transport_.SimulateNetworkDelay(TimeDelta::Millis(0));
sender_.transport_.SimulateNetworkDelay(TimeDelta::Zero());
receiver_.transport_.SimulateNetworkDelay(TimeDelta::Zero());
// Move ahead to the instant a rtcp is expected.
// Verify no SR is sent before media has been sent, RR should still be sent
@ -607,7 +607,7 @@ TEST_P(RtpRtcpImpl2Test, SendsExtendedNackList) {
}
TEST_P(RtpRtcpImpl2Test, ReSendsNackListAfterRttMs) {
sender_.transport_.SimulateNetworkDelay(TimeDelta::Millis(0));
sender_.transport_.SimulateNetworkDelay(TimeDelta::Zero());
// Send module sends a NACK.
const uint16_t kNackLength = 2;
uint16_t nack_list[kNackLength] = {123, 125};
@ -632,7 +632,7 @@ TEST_P(RtpRtcpImpl2Test, ReSendsNackListAfterRttMs) {
}
TEST_P(RtpRtcpImpl2Test, UniqueNackRequests) {
receiver_.transport_.SimulateNetworkDelay(TimeDelta::Millis(0));
receiver_.transport_.SimulateNetworkDelay(TimeDelta::Zero());
EXPECT_EQ(0U, receiver_.RtcpSent().nack_packets);
EXPECT_EQ(0U, receiver_.RtcpSent().nack_requests);
EXPECT_EQ(0U, receiver_.RtcpSent().unique_nack_requests);