OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/scheduler/renderer/task_cost_estimator.h" | 5 #include "components/scheduler/renderer/task_cost_estimator.h" |
6 | 6 |
7 #include "base/time/default_tick_clock.h" | 7 #include "base/time/default_tick_clock.h" |
8 | 8 |
9 namespace scheduler { | 9 namespace scheduler { |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 rolling_time_delta_history_.InsertSample(duration); | 30 rolling_time_delta_history_.InsertSample(duration); |
31 } | 31 } |
32 } | 32 } |
33 | 33 |
34 base::TimeDelta TaskCostEstimator::expected_task_duration() const { | 34 base::TimeDelta TaskCostEstimator::expected_task_duration() const { |
35 return rolling_time_delta_history_.Percentile(estimation_percentile_); | 35 return rolling_time_delta_history_.Percentile(estimation_percentile_); |
36 } | 36 } |
37 | 37 |
38 void TaskCostEstimator::Clear() { | 38 void TaskCostEstimator::Clear() { |
39 rolling_time_delta_history_.Clear(); | 39 rolling_time_delta_history_.Clear(); |
40 expected_task_duration_ = base::TimeDelta(); | |
41 } | 40 } |
42 | 41 |
43 } // namespace scheduler | 42 } // namespace scheduler |
OLD | NEW |