• 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/fake_task.h"
6 
7 namespace base {
8 namespace sequence_manager {
9 
FakeTask()10 FakeTask::FakeTask()
11     : TaskQueue::Task(TaskQueue::PostedTask(OnceClosure(), FROM_HERE),
12                       TimeTicks()) {}
13 
FakeTaskTiming()14 FakeTaskTiming::FakeTaskTiming()
15     : TaskTiming(false /* has_wall_time */, false /* has_thread_time */) {}
16 
FakeTaskTiming(TimeTicks start,TimeTicks end)17 FakeTaskTiming::FakeTaskTiming(TimeTicks start, TimeTicks end)
18     : FakeTaskTiming() {
19   has_wall_time_ = true;
20   start_time_ = start;
21   end_time_ = end;
22 }
23 
FakeTaskTiming(TimeTicks start,TimeTicks end,ThreadTicks thread_start,ThreadTicks thread_end)24 FakeTaskTiming::FakeTaskTiming(TimeTicks start,
25                                TimeTicks end,
26                                ThreadTicks thread_start,
27                                ThreadTicks thread_end)
28     : FakeTaskTiming(start, end) {
29   has_thread_time_ = true;
30   start_thread_time_ = thread_start;
31   end_thread_time_ = thread_end;
32 }
33 
34 }  // namespace sequence_manager
35 }  // namespace base
36