xref: /aosp_15_r20/external/cronet/base/time/default_clock.cc (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright 2012 The Chromium Authors
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 
Now() const13 Time DefaultClock::Now() const {
14   return Time::Now();
15 }
16 
17 // static
GetInstance()18 DefaultClock* DefaultClock::GetInstance() {
19   static base::NoDestructor<DefaultClock> instance;
20   return instance.get();
21 }
22 
23 }  // namespace base
24