Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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/default_clock.h" | |
| 6 #include "base/lazy_instance.h" | |
| 7 | |
| 8 namespace base { | |
| 9 | |
| 10 namespace { | |
| 11 | |
| 12 LazyInstance<DefaultClock> default_clock = LAZY_INSTANCE_INITIALIZER; | |
|
Ryan Sleevi
2012/12/17 19:54:46
DESIGN: Should this be Leaky, to match the worker-
awong
2012/12/17 19:55:11
nit: g_default_clock
akalin
2012/12/17 22:38:31
Brett didn't like the lazy instance, so I removed
akalin
2012/12/17 22:38:31
removed lazy instance
| |
| 13 | |
| 14 } // namespace | |
| 15 | |
| 16 DefaultClock::~DefaultClock() {} | |
| 17 | |
| 18 Time DefaultClock::Now() { | |
| 19 return Time::Now(); | |
| 20 } | |
| 21 | |
| 22 // static | |
| 23 DefaultClock* DefaultClock::Get() { | |
| 24 return default_clock.Pointer(); | |
| 25 } | |
| 26 | |
| 27 } // namespace base | |
| OLD | NEW |