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

Unified Diff: webrtc/base/fakeclock.h

Issue 2877023002: Move webrtc/{base => rtc_base} (Closed)
Patch Set: update presubmit.py and DEPS include rules Created 3 years, 6 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/base/event_unittest.cc ('k') | webrtc/base/fakeclock.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/fakeclock.h
diff --git a/webrtc/base/fakeclock.h b/webrtc/base/fakeclock.h
index fcdfc0bc2575fc24e5a37213ee0e64cd4ecf463f..22d640dbe5e67ef6dc91faa41935081fb8d488af 100644
--- a/webrtc/base/fakeclock.h
+++ b/webrtc/base/fakeclock.h
@@ -11,61 +11,9 @@
#ifndef WEBRTC_BASE_FAKECLOCK_H_
#define WEBRTC_BASE_FAKECLOCK_H_
-#include "webrtc/base/criticalsection.h"
-#include "webrtc/base/timedelta.h"
-#include "webrtc/base/timeutils.h"
-namespace rtc {
-
-// Fake clock for use with unit tests, which does not tick on its own.
-// Starts at time 0.
-//
-// TODO(deadbeef): Unify with webrtc::SimulatedClock.
-class FakeClock : public ClockInterface {
- public:
- ~FakeClock() override {}
-
- // ClockInterface implementation.
- int64_t TimeNanos() const override;
-
- // Methods that can be used by the test to control the time.
-
- // Should only be used to set a time in the future.
- void SetTimeNanos(int64_t nanos);
- void SetTimeMicros(int64_t micros) {
- SetTimeNanos(kNumNanosecsPerMicrosec * micros);
- }
-
- void AdvanceTime(TimeDelta delta);
- void AdvanceTimeMicros(int64_t micros) {
- AdvanceTime(rtc::TimeDelta::FromMicroseconds(micros));
- }
- private:
- CriticalSection lock_;
- int64_t time_ GUARDED_BY(lock_) = 0;
-};
-
-// Helper class that sets itself as the global clock in its constructor and
-// unsets it in its destructor.
-class ScopedFakeClock : public FakeClock {
- public:
- ScopedFakeClock();
- ~ScopedFakeClock() override;
-
- private:
- ClockInterface* prev_clock_;
-};
-
-// Helper class to "undo" the fake clock temporarily.
-class ScopedRealClock {
- public:
- ScopedRealClock();
- ~ScopedRealClock();
-
- private:
- ClockInterface* prev_clock_;
-};
-
-} // namespace rtc
+// This header is deprecated and is just left here temporarily during
+// refactoring. See https://bugs.webrtc.org/7634 for more details.
+#include "webrtc/rtc_base/fakeclock.h"
#endif // WEBRTC_BASE_FAKECLOCK_H_
« no previous file with comments | « webrtc/base/event_unittest.cc ('k') | webrtc/base/fakeclock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698