| 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_clock.h" |
| 6 | |
| 7 | #include "base/no_destructor.h" |
| 8 | |
| 9 | namespace base { |
| 10 | |
| 11 | DefaultClock::~DefaultClock() = default; |
| 12 | |
| 13 | Time DefaultClock::Now() const { |
| 14 | return Time::Now(); |
| 15 | } |
| 16 | |
| 17 | // static |
| 18 | DefaultClock* DefaultClock::GetInstance() { |
| 19 | static base::NoDestructor<DefaultClock> instance; |
| 20 | return instance.get(); |
| 21 | } |
| 22 | |
| 23 | } // namespace base |
| 24 | |