Migrate CallStats and RtpStreamsSynchronizer timers over to RepeatingTask
Bug: none
Change-Id: Ib49a3de74c6d3a6d4ea158383a5e4b69a1e58ab9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175000
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31252}
diff --git a/video/call_stats2_unittest.cc b/video/call_stats2_unittest.cc
index 58af6fd..73fe4b4 100644
--- a/video/call_stats2_unittest.cc
+++ b/video/call_stats2_unittest.cc
@@ -96,12 +96,13 @@
.Times(2)
.WillOnce(InvokeWithoutArgs([this] {
// Advance clock and verify we get an update.
- fake_clock_.AdvanceTimeMilliseconds(CallStats::kUpdateIntervalMs);
+ fake_clock_.AdvanceTimeMilliseconds(CallStats::kUpdateInterval.ms());
}))
.WillRepeatedly(InvokeWithoutArgs([this] {
AsyncSimulateRttUpdate(kRtt2);
// Advance clock just too little to get an update.
- fake_clock_.AdvanceTimeMilliseconds(CallStats::kUpdateIntervalMs - 1);
+ fake_clock_.AdvanceTimeMilliseconds(CallStats::kUpdateInterval.ms() -
+ 1);
}));
// In case you're reading this and wondering how this number is arrived at,
@@ -256,7 +257,7 @@
.Times(AnyNumber())
.WillOnce(InvokeWithoutArgs([this] {
EXPECT_EQ(kAvgRtt1, call_stats_.LastProcessedRtt());
- fake_clock_.AdvanceTimeMilliseconds(CallStats::kUpdateIntervalMs);
+ fake_clock_.AdvanceTimeMilliseconds(CallStats::kUpdateInterval.ms());
AsyncSimulateRttUpdate(kRttLow);
AsyncSimulateRttUpdate(kRttHigh);
}))
@@ -272,7 +273,7 @@
// Set a first values and verify that LastProcessedRtt initially returns the
// average rtt.
- fake_clock_.AdvanceTimeMilliseconds(CallStats::kUpdateIntervalMs);
+ fake_clock_.AdvanceTimeMilliseconds(CallStats::kUpdateInterval.ms());
AsyncSimulateRttUpdate(kRttLow);
loop_.Run();
EXPECT_EQ(kAvgRtt2, call_stats_.LastProcessedRtt());
@@ -292,7 +293,7 @@
AsyncSimulateRttUpdate(kRtt);
loop_.Run();
fake_clock_.AdvanceTimeMilliseconds(metrics::kMinRunTimeInSeconds *
- CallStats::kUpdateIntervalMs);
+ CallStats::kUpdateInterval.ms());
AsyncSimulateRttUpdate(kRtt);
loop_.Run();