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

Unified Diff: net/quic/test_tools/mock_clock.cc

Issue 11956029: MockClock needs to mock the NowAsDeltaSinceUnixEpoch method. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Use QuicTime() to mock the Unix epoch Created 7 years, 11 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/quic/test_tools/mock_clock.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/mock_clock.cc
===================================================================
--- net/quic/test_tools/mock_clock.cc (revision 177200)
+++ net/quic/test_tools/mock_clock.cc (working copy)
@@ -21,6 +21,10 @@
return now_;
}
+QuicTime::Delta MockClock::NowAsDeltaSinceUnixEpoch() const {
+ return now_.Subtract(QuicTime());
+}
+
base::TimeTicks MockClock::NowInTicks() const {
base::TimeTicks ticks;
return ticks + base::TimeDelta::FromMicroseconds(
« no previous file with comments | « net/quic/test_tools/mock_clock.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698