| 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 #include "base/waitable_event.h" | 5 #include "base/waitable_event.h" |
| 6 | 6 |
| 7 using base::TimeDelta; |
| 8 using base::TimeTicks; |
| 9 |
| 7 namespace base { | 10 namespace base { |
| 8 | 11 |
| 9 WaitableEvent::WaitableEvent(bool manual_reset, bool signaled) | 12 WaitableEvent::WaitableEvent(bool manual_reset, bool signaled) |
| 10 : lock_(), | 13 : lock_(), |
| 11 cvar_(&lock_), | 14 cvar_(&lock_), |
| 12 signaled_(signaled), | 15 signaled_(signaled), |
| 13 manual_reset_(manual_reset) { | 16 manual_reset_(manual_reset) { |
| 14 } | 17 } |
| 15 | 18 |
| 16 WaitableEvent::~WaitableEvent() { | 19 WaitableEvent::~WaitableEvent() { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 break; | 66 break; |
| 64 } | 67 } |
| 65 bool result = signaled_; | 68 bool result = signaled_; |
| 66 if (!manual_reset_) | 69 if (!manual_reset_) |
| 67 signaled_ = false; | 70 signaled_ = false; |
| 68 return result; | 71 return result; |
| 69 } | 72 } |
| 70 | 73 |
| 71 } // namespace base | 74 } // namespace base |
| 72 | 75 |
| OLD | NEW |