1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #ifndef BASE_TEST_SIMPLE_TEST_CLOCK_H_
- #define BASE_TEST_SIMPLE_TEST_CLOCK_H_
- #include "base/compiler_specific.h"
- #include "base/synchronization/lock.h"
- #include "base/time/clock.h"
- #include "base/time/time.h"
- namespace base {
- class SimpleTestClock : public Clock {
- public:
-
- SimpleTestClock();
- ~SimpleTestClock() override;
- Time Now() const override;
-
- void Advance(TimeDelta delta);
-
- void SetNow(Time now);
- private:
-
- mutable Lock lock_;
- Time now_;
- };
- }
- #endif
|