OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // The Watchdog class creates a second thread that can Alarm if a specific | 5 // The Watchdog class creates a second thread that can Alarm if a specific |
6 // duration of time passes without proper attention. The duration of time is | 6 // duration of time passes without proper attention. The duration of time is |
7 // specified at construction time. The Watchdog may be used many times by | 7 // specified at construction time. The Watchdog may be used many times by |
8 // simply calling Arm() (to start timing) and Disarm() (to reset the timer). | 8 // simply calling Arm() (to start timing) and Disarm() (to reset the timer). |
9 // The Watchdog is typically used under a debugger, where the stack traces on | 9 // The Watchdog is typically used under a debugger, where the stack traces on |
10 // other threads can be examined if/when the Watchdog alarms. | 10 // other threads can be examined if/when the Watchdog alarms. |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 static Lock static_lock_; // Lock for access of static data... | 82 static Lock static_lock_; // Lock for access of static data... |
83 // When did we last alarm and get stuck (for a while) in a debugger? | 83 // When did we last alarm and get stuck (for a while) in a debugger? |
84 static base::TimeTicks last_debugged_alarm_time_; | 84 static base::TimeTicks last_debugged_alarm_time_; |
85 // How long did we sit on a break in the debugger? | 85 // How long did we sit on a break in the debugger? |
86 static base::TimeDelta last_debugged_alarm_delay_; | 86 static base::TimeDelta last_debugged_alarm_delay_; |
87 | 87 |
88 DISALLOW_COPY_AND_ASSIGN(Watchdog); | 88 DISALLOW_COPY_AND_ASSIGN(Watchdog); |
89 }; | 89 }; |
90 | 90 |
91 #endif // BASE_WATCHDOG_H__ | 91 #endif // BASE_WATCHDOG_H__ |
92 | |
OLD | NEW |