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

Unified Diff: net/tools/quic/test_tools/quic_test_client.cc

Issue 2125303002: Use overloaded operators with QuicTime for addition, subtraction and scalar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@126402784
Patch Set: Created 4 years, 5 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 | « net/tools/quic/test_tools/packet_dropping_test_writer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/test_tools/quic_test_client.cc
diff --git a/net/tools/quic/test_tools/quic_test_client.cc b/net/tools/quic/test_tools/quic_test_client.cc
index 651adf8c30955ed620d2cf0be0b4740d8c7e16eb..ad5748d8185a4fd91a481a0702db582ee0cee5e1 100644
--- a/net/tools/quic/test_tools/quic_test_client.cc
+++ b/net/tools/quic/test_tools/quic_test_client.cc
@@ -496,7 +496,7 @@ void QuicTestClient::WaitForResponseForMs(int timeout_ms) {
QuicConnectionPeer::GetHelper(client()->session()->connection())
->GetClock();
QuicTime end_waiting_time =
- clock->Now().Add(QuicTime::Delta::FromMicroseconds(timeout_us));
+ clock->Now() + QuicTime::Delta::FromMicroseconds(timeout_us);
while (HaveActiveStream() &&
(timeout_us < 0 || clock->Now() < end_waiting_time)) {
client_->WaitForEvents();
@@ -516,7 +516,7 @@ void QuicTestClient::WaitForInitialResponseForMs(int timeout_ms) {
QuicConnectionPeer::GetHelper(client()->session()->connection())
->GetClock();
QuicTime end_waiting_time =
- clock->Now().Add(QuicTime::Delta::FromMicroseconds(timeout_us));
+ clock->Now() + QuicTime::Delta::FromMicroseconds(timeout_us);
while (stream_ != nullptr &&
!client_->session()->IsClosedStream(stream_->id()) &&
stream_->stream_bytes_read() == 0 &&
« no previous file with comments | « net/tools/quic/test_tools/packet_dropping_test_writer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698