OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/gpu/gpu_watchdog_thread.h" |
| 6 |
| 7 #include <errno.h> |
| 8 |
5 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
6 #include <windows.h> | 10 #include <windows.h> |
7 #endif | 11 #endif |
8 | 12 |
9 #include "content/gpu/gpu_watchdog_thread.h" | |
10 | |
11 #include "base/bind.h" | 13 #include "base/bind.h" |
12 #include "base/bind_helpers.h" | 14 #include "base/bind_helpers.h" |
13 #include "base/command_line.h" | 15 #include "base/command_line.h" |
14 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
15 #include "base/files/file_util.h" | 17 #include "base/files/file_util.h" |
16 #include "base/location.h" | 18 #include "base/location.h" |
17 #include "base/power_monitor/power_monitor.h" | 19 #include "base/power_monitor/power_monitor.h" |
18 #include "base/process/process.h" | 20 #include "base/process/process.h" |
19 #include "base/single_thread_task_runner.h" | 21 #include "base/single_thread_task_runner.h" |
20 #include "build/build_config.h" | 22 #include "build/build_config.h" |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 // not increasing. The other is where either the kernel hangs and never | 395 // not increasing. The other is where either the kernel hangs and never |
394 // returns to user level or where user level code | 396 // returns to user level or where user level code |
395 // calls into kernel level repeatedly, giving up its quanta before it is | 397 // calls into kernel level repeatedly, giving up its quanta before it is |
396 // tracked, for example a loop that repeatedly Sleeps. | 398 // tracked, for example a loop that repeatedly Sleeps. |
397 return base::TimeDelta::FromMilliseconds(static_cast<int64>( | 399 return base::TimeDelta::FromMilliseconds(static_cast<int64>( |
398 (user_time64.QuadPart + kernel_time64.QuadPart) / 10000)); | 400 (user_time64.QuadPart + kernel_time64.QuadPart) / 10000)); |
399 } | 401 } |
400 #endif | 402 #endif |
401 | 403 |
402 } // namespace content | 404 } // namespace content |
OLD | NEW |