Chromium Code Reviews| Index: base/test/simple_test_tick_clock.h |
| diff --git a/base/test/simple_test_tick_clock.h b/base/test/simple_test_tick_clock.h |
| index aebdebcbcf54e7016a1629b5405eb40cbf22d801..07bbaf5ddfe9bf6d97060325927daa3c4d4ffc14 100644 |
| --- a/base/test/simple_test_tick_clock.h |
| +++ b/base/test/simple_test_tick_clock.h |
| @@ -19,13 +19,21 @@ class SimpleTestTickClock : public TickClock { |
| public: |
| // Starts off with a clock set to TimeTicks(). |
| SimpleTestTickClock(); |
| + SimpleTestTickClock(int64_t initial); |
|
Paweł Hajdan Jr.
2015/05/26 11:30:25
Why are these additional ctors needed?
Ankur Verma
2015/05/26 12:58:29
These are convenience ctors really, for usage unde
|
| + SimpleTestTickClock(TimeTicks initial); |
| ~SimpleTestTickClock() override; |
| TimeTicks NowTicks() override; |
| + void Set(TimeTicks time); |
|
Paweł Hajdan Jr.
2015/05/26 11:30:25
Why is Set needed?
Ankur Verma
2015/05/26 12:58:29
Again meant for convenient usage under cctests. Ca
|
| // Advances the clock by |delta|, which must not be negative. |
| void Advance(TimeDelta delta); |
| + // Convenience functions to make the now source easier to use in unit |
|
Paweł Hajdan Jr.
2015/05/26 11:30:25
I don't see a reason enough for these convenience
Ankur Verma
2015/05/26 12:58:29
I understand SimpleTestTickClock must be as simple
|
| + // tests. |
| + void AdvanceMicroseconds(int64_t period_in_microseconds); |
| + void SetMicroseconds(int64_t time_in_microseconds); |
| + |
| private: |
| // Protects |now_ticks_|. |
| Lock lock_; |