mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-28 16:26:10 +03:00
42 lines
1.3 KiB
C++
42 lines
1.3 KiB
C++
// 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() : FakeTask(0 /* task_type */) {}
|
|
|
|
FakeTask::FakeTask(int task_type)
|
|
: TaskQueue::Task(TaskQueue::PostedTask(OnceClosure(),
|
|
FROM_HERE,
|
|
TimeDelta(),
|
|
Nestable::kNestable,
|
|
task_type),
|
|
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
|