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

Unified Diff: webrtc/p2p/base/p2ptransportchannel_unittest.cc

Issue 1793553002: Using 64-bit timestamp in webrtc/p2p (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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/p2p/base/p2ptransportchannel.cc ('k') | webrtc/p2p/base/port.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/p2ptransportchannel_unittest.cc
diff --git a/webrtc/p2p/base/p2ptransportchannel_unittest.cc b/webrtc/p2p/base/p2ptransportchannel_unittest.cc
index e083c33f4d255cefc10e5257f4c39e52ce291d79..d3332ebd0fd2313c10c2c3d29bd3a8a0fab1abbf 100644
--- a/webrtc/p2p/base/p2ptransportchannel_unittest.cc
+++ b/webrtc/p2p/base/p2ptransportchannel_unittest.cc
@@ -504,7 +504,8 @@ class P2PTransportChannelTestBase : public testing::Test,
}
void Test(const Result& expected) {
- int32_t connect_start = rtc::Time(), connect_time;
+ int64_t connect_start = rtc::Time64();
+ int64_t connect_time;
// Create the channels and wait for them to connect.
CreateChannels(1);
@@ -516,7 +517,7 @@ class P2PTransportChannelTestBase : public testing::Test,
ep2_ch1()->writable(),
expected.connect_wait,
1000);
- connect_time = rtc::TimeSince(connect_start);
+ connect_time = rtc::Time64() - connect_start;
if (connect_time < expected.connect_wait) {
LOG(LS_INFO) << "Connect time: " << connect_time << " ms";
} else {
@@ -528,8 +529,9 @@ class P2PTransportChannelTestBase : public testing::Test,
// This may take up to 2 seconds.
if (ep1_ch1()->best_connection() &&
ep2_ch1()->best_connection()) {
- int32_t converge_start = rtc::Time(), converge_time;
- int converge_wait = 2000;
+ int64_t converge_start = rtc::Time64();
+ int64_t converge_time;
+ int64_t converge_wait = 2000;
EXPECT_TRUE_WAIT_MARGIN(CheckCandidate1(expected), converge_wait,
converge_wait);
// Also do EXPECT_EQ on each part so that failures are more verbose.
@@ -545,7 +547,7 @@ class P2PTransportChannelTestBase : public testing::Test,
// For verbose
ExpectCandidate2(expected);
- converge_time = rtc::TimeSince(converge_start);
+ converge_time = rtc::Time64() - converge_start;
if (converge_time < converge_wait) {
LOG(LS_INFO) << "Converge time: " << converge_time << " ms";
} else {
@@ -1771,7 +1773,7 @@ TEST_F(P2PTransportChannelMultihomedTest, TestPingBackupConnectionRate) {
ASSERT_EQ(2U, connections.size());
cricket::Connection* backup_conn = connections[1];
EXPECT_TRUE_WAIT(backup_conn->writable(), 3000);
- uint32_t last_ping_response_ms = backup_conn->last_ping_response_received();
+ int64_t last_ping_response_ms = backup_conn->last_ping_response_received();
EXPECT_TRUE_WAIT(
last_ping_response_ms < backup_conn->last_ping_response_received(), 5000);
int time_elapsed =
« no previous file with comments | « webrtc/p2p/base/p2ptransportchannel.cc ('k') | webrtc/p2p/base/port.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698