• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2018 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/task/sequence_manager/test/mock_time_domain.h"
6 
7 namespace base {
8 namespace sequence_manager {
9 
MockTimeDomain(TimeTicks initial_now_ticks)10 MockTimeDomain::MockTimeDomain(TimeTicks initial_now_ticks)
11     : now_ticks_(initial_now_ticks) {}
12 
13 MockTimeDomain::~MockTimeDomain() = default;
14 
CreateLazyNow() const15 LazyNow MockTimeDomain::CreateLazyNow() const {
16   return LazyNow(now_ticks_);
17 }
18 
Now() const19 TimeTicks MockTimeDomain::Now() const {
20   return now_ticks_;
21 }
22 
SetNowTicks(TimeTicks now_ticks)23 void MockTimeDomain::SetNowTicks(TimeTicks now_ticks) {
24   now_ticks_ = now_ticks;
25 }
26 
DelayTillNextTask(LazyNow * lazy_now)27 Optional<TimeDelta> MockTimeDomain::DelayTillNextTask(LazyNow* lazy_now) {
28   return nullopt;
29 }
30 
SetNextDelayedDoWork(LazyNow * lazy_now,TimeTicks run_time)31 void MockTimeDomain::SetNextDelayedDoWork(LazyNow* lazy_now,
32                                           TimeTicks run_time) {}
33 
GetName() const34 const char* MockTimeDomain::GetName() const {
35   return "MockTimeDomain";
36 }
37 
38 }  // namespace sequence_manager
39 }  // namespace base
40