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/lazy_instance.h" 8 9 namespace base { 10 11 DefaultClock::~DefaultClock() = default; 12 Now() const13Time DefaultClock::Now() const { 14 return Time::Now(); 15 } 16 17 // static GetInstance()18DefaultClock* DefaultClock::GetInstance() { 19 static LazyInstance<DefaultClock>::Leaky instance = LAZY_INSTANCE_INITIALIZER; 20 return instance.Pointer(); 21 } 22 23 } // namespace base 24