1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef BASE_TIME_DEFAULT_TICK_CLOCK_H_ 6 #define BASE_TIME_DEFAULT_TICK_CLOCK_H_ 7 8 #include "base/base_export.h" 9 #include "base/time/tick_clock.h" 10 11 namespace base { 12 13 // DefaultClock is a Clock implementation that uses TimeTicks::Now(). 14 class BASE_EXPORT DefaultTickClock : public TickClock { 15 public: 16 ~DefaultTickClock() override; 17 18 // Simply returns TimeTicks::Now(). 19 TimeTicks NowTicks() const override; 20 21 // Returns a shared instance of DefaultTickClock. This is thread-safe. 22 static const DefaultTickClock* GetInstance(); 23 }; 24 25 } // namespace base 26 27 #endif // BASE_TIME_DEFAULT_TICK_CLOCK_H_ 28