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

Unified Diff: base/synchronization/waitable_event.h

Issue 2433773005: Move OS_WIN specific logic in MessagePumpDefault::Run into waitable_event_win.cc (Closed)
Patch Set: Special handling of is_null() TimeTicks in TimedWaitUntil Created 4 years, 1 month 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: base/synchronization/waitable_event.h
diff --git a/base/synchronization/waitable_event.h b/base/synchronization/waitable_event.h
index 3863e98455ee10e74f1ee6c40994aadd5012d947..0ca7d4b9a2c2d1bd08836bb4134b1ed960148362 100644
--- a/base/synchronization/waitable_event.h
+++ b/base/synchronization/waitable_event.h
@@ -25,6 +25,7 @@
namespace base {
class TimeDelta;
+class TimeTicks;
// A WaitableEvent can be a useful thread synchronization tool when you want to
// allow one thread to wait for another thread to finish some work. For
@@ -87,11 +88,16 @@ class BASE_EXPORT WaitableEvent {
void Wait();
// Wait up until max_time has passed for the event to be signaled. Returns
- // true if the event was signaled. If this method returns false, then it
- // does not necessarily mean that max_time was exceeded.
+ // true if the event was signaled.
//
// TimedWait can synchronise its own destruction like |Wait|.
- bool TimedWait(const TimeDelta& max_time);
+ bool TimedWait(const TimeDelta& max_delta);
+
+ // Wait up until end_time deadline has passed for the event to be signaled.
+ // Return true if the event was signaled.
+ //
+ // TimedWaitUntil can synchronise its own destruction like |Wait|.
+ bool TimedWaitUntil(const TimeTicks& end_time);
#if defined(OS_WIN)
HANDLE handle() const { return handle_.Get(); }

Powered by Google App Engine
This is Rietveld 408576698