blob: 188c3cf921b542b00f131a93e6724d258a4e31e2 [file] [log] [blame]
[email protected]0cb3d72e2013-02-21 21:50:341// 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 Thompsonaa48ce8d2018-04-03 06:11:437#include "base/no_destructor.h"
tzikdd2db6562017-11-28 09:14:288
[email protected]0cb3d72e2013-02-21 21:50:349namespace base {
10
Chris Watkinsbb7211c2017-11-29 07:16:3811DefaultTickClock::~DefaultTickClock() = default;
[email protected]0cb3d72e2013-02-21 21:50:3412
Greg Thompson821f0e3382018-03-27 03:15:0313TimeTicks DefaultTickClock::NowTicks() const {
[email protected]0cb3d72e2013-02-21 21:50:3414 return TimeTicks::Now();
15}
16
tzikaaa48e62017-11-28 07:43:4317// static
Greg Thompsonaa48ce8d2018-04-03 06:11:4318const DefaultTickClock* DefaultTickClock::GetInstance() {
19 static const base::NoDestructor<DefaultTickClock> default_tick_clock;
20 return default_tick_clock.get();
tzikaaa48e62017-11-28 07:43:4321}
22
[email protected]0cb3d72e2013-02-21 21:50:3423} // namespace base