// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/task/sequence_manager/test/fake_task.h"

namespace base {
namespace sequence_manager {

FakeTask::FakeTask()
    : TaskQueue::Task(TaskQueue::PostedTask(OnceClosure(), FROM_HERE),
                      TimeTicks()) {}

FakeTaskTiming::FakeTaskTiming()
    : TaskTiming(false /* has_wall_time */, false /* has_thread_time */) {}

FakeTaskTiming::FakeTaskTiming(TimeTicks start, TimeTicks end)
    : FakeTaskTiming() {
  has_wall_time_ = true;
  start_time_ = start;
  end_time_ = end;
}

FakeTaskTiming::FakeTaskTiming(TimeTicks start,
                               TimeTicks end,
                               ThreadTicks thread_start,
                               ThreadTicks thread_end)
    : FakeTaskTiming(start, end) {
  has_thread_time_ = true;
  start_thread_time_ = thread_start;
  end_thread_time_ = thread_end;
}

}  // namespace sequence_manager
}  // namespace base
