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

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: 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)
@@ -15,12 +15,17 @@
void MockClock::AdvanceTime(QuicTime::Delta delta) {
CHECK_LE(0, delta.ToMicroseconds());
now_ = now_.Add(delta);
+ now_as_delta_since_unix_epoch_ = now_as_delta_since_unix_epoch_.Add(delta);
Ryan Hamilton 2013/01/16 22:42:23 It appears that now_as_delta_since_unix_epoch_ is
wtc 2013/01/16 23:00:59 Good idea! Thanks for the suggestion.
}
QuicTime MockClock::Now() const {
return now_;
}
+QuicTime::Delta MockClock::NowAsDeltaSinceUnixEpoch() const {
+ return now_as_delta_since_unix_epoch_;
+}
+
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