Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Unified Diff: webrtc/base/testclient.cc

Issue 2005993002: Remove timing dependent packet checks from socket tests. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/base/testclient.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/testclient.cc
diff --git a/webrtc/base/testclient.cc b/webrtc/base/testclient.cc
index fbb4f0cdf33b138a59f34ebe95898c8a74e05b89..fcf64e7d6210356f368343eb3a2cff5a141c4cc9 100644
--- a/webrtc/base/testclient.cc
+++ b/webrtc/base/testclient.cc
@@ -105,21 +105,12 @@ bool TestClient::CheckTimestamp(int64_t packet_timestamp) {
if (packet_timestamp == -1) {
res = false;
}
- int64_t time_us = rtc::TimeMicros();
if (prev_packet_timestamp_ != -1) {
if (packet_timestamp < prev_packet_timestamp_) {
res = false;
}
- const int64_t kErrorMarginUs = 20000;
- if (packet_timestamp - prev_packet_timestamp_ <
- time_us - prev_time_us_ - kErrorMarginUs ||
- packet_timestamp - prev_packet_timestamp_ >
- time_us - prev_time_us_ + kErrorMarginUs) {
- res = false;
- }
}
prev_packet_timestamp_ = packet_timestamp;
- prev_time_us_ = time_us;
return res;
}
« no previous file with comments | « webrtc/base/testclient.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698