[email protected] | 0cb3d72e | 2013-02-21 21:50:34 | [diff] [blame] | 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 | #include "base/time/default_tick_clock.h" | ||||
6 | |||||
Greg Thompson | aa48ce8d | 2018-04-03 06:11:43 | [diff] [blame] | 7 | #include "base/no_destructor.h" |
tzik | dd2db656 | 2017-11-28 09:14:28 | [diff] [blame] | 8 | |
[email protected] | 0cb3d72e | 2013-02-21 21:50:34 | [diff] [blame] | 9 | namespace base { |
10 | |||||
Chris Watkins | bb7211c | 2017-11-29 07:16:38 | [diff] [blame] | 11 | DefaultTickClock::~DefaultTickClock() = default; |
[email protected] | 0cb3d72e | 2013-02-21 21:50:34 | [diff] [blame] | 12 | |
Greg Thompson | 821f0e338 | 2018-03-27 03:15:03 | [diff] [blame] | 13 | TimeTicks DefaultTickClock::NowTicks() const { |
[email protected] | 0cb3d72e | 2013-02-21 21:50:34 | [diff] [blame] | 14 | return TimeTicks::Now(); |
15 | } | ||||
16 | |||||
tzik | aaa48e6 | 2017-11-28 07:43:43 | [diff] [blame] | 17 | // static |
Greg Thompson | aa48ce8d | 2018-04-03 06:11:43 | [diff] [blame] | 18 | const DefaultTickClock* DefaultTickClock::GetInstance() { |
19 | static const base::NoDestructor<DefaultTickClock> default_tick_clock; | ||||
20 | return default_tick_clock.get(); | ||||
tzik | aaa48e6 | 2017-11-28 07:43:43 | [diff] [blame] | 21 | } |
22 | |||||
[email protected] | 0cb3d72e | 2013-02-21 21:50:34 | [diff] [blame] | 23 | } // namespace base |