Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1112)

Unified Diff: third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc

Issue 2258133002: [scheduler] Implement time-based cpu throttling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use double instead of base::TimeTicks Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
index f44ee457a87e5189ddb438b495d6db1920f95be9..f07c0601ae5c59cd18e6e4d635a60a80391cc3fa 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
+++ b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
@@ -226,9 +226,12 @@ void TaskQueueManager::DoWork(base::TimeTicks run_time, bool from_main_thread) {
if (!delegate_->IsNested() && task_start_time != base::TimeTicks()) {
// Only report top level task durations.
base::TimeTicks task_end_time = lazy_now.Now();
+
FOR_EACH_OBSERVER(TaskTimeObserver, task_time_observers_,
- ReportTaskTime(MonotonicTimeInSeconds(task_start_time),
+ ReportTaskTime(work_queue->task_queue(),
+ MonotonicTimeInSeconds(task_start_time),
MonotonicTimeInSeconds(task_end_time)));
+
task_start_time = task_end_time;
}

Powered by Google App Engine
This is Rietveld 408576698