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

Unified Diff: webrtc/system_wrappers/include/tick_util.h

Issue 1512853002: Nuke TickTime::UseFakeClock. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: feedback Created 5 years 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/call/congestion_controller.cc ('k') | webrtc/system_wrappers/source/tick_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/system_wrappers/include/tick_util.h
diff --git a/webrtc/system_wrappers/include/tick_util.h b/webrtc/system_wrappers/include/tick_util.h
index f8a5ef77770fd23d8eb510f646f5193ed954dff2..52f9b4ae4d3b084f434727a7647db3e7324ab415 100644
--- a/webrtc/system_wrappers/include/tick_util.h
+++ b/webrtc/system_wrappers/include/tick_util.h
@@ -65,19 +65,9 @@ class TickTime {
// Returns a TickInterval that is the difference in ticks beween rhs and lhs.
friend TickInterval operator-(const TickTime& lhs, const TickTime& rhs);
- // Call to engage the fake clock. This is useful for tests since relying on
- // a real clock often makes the test flaky.
- static void UseFakeClock(int64_t start_millisecond);
-
- // Advance the fake clock. Must be called after UseFakeClock.
- static void AdvanceFakeClock(int64_t milliseconds);
-
private:
static int64_t QueryOsForTicks();
- static bool use_fake_clock_;
- static int64_t fake_ticks_;
-
int64_t ticks_;
};
@@ -166,10 +156,7 @@ inline TickTime::TickTime(int64_t ticks)
}
inline TickTime TickTime::Now() {
- if (use_fake_clock_)
- return TickTime(fake_ticks_);
- else
- return TickTime(QueryOsForTicks());
+ return TickTime(QueryOsForTicks());
}
inline int64_t TickTime::Ticks() const {
« no previous file with comments | « webrtc/call/congestion_controller.cc ('k') | webrtc/system_wrappers/source/tick_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698