| Index: base/synchronization/waitable_event_unittest.cc
|
| diff --git a/base/synchronization/waitable_event_unittest.cc b/base/synchronization/waitable_event_unittest.cc
|
| index ac5c9f125584da09b4a829cf24f8a250e8f81ab8..545f7be440c95a976447b70c6073d5be0d4b4c9e 100644
|
| --- a/base/synchronization/waitable_event_unittest.cc
|
| +++ b/base/synchronization/waitable_event_unittest.cc
|
| @@ -160,4 +160,15 @@ TEST(WaitableEventTest, MAYBE_TimedWait) {
|
| PlatformThread::Join(thread);
|
| }
|
|
|
| +// Tests that a sub-ms TimedWait doesn't time out promptly.
|
| +TEST(WaitableEventTest, SubMsTimedWait) {
|
| + WaitableEvent ev(WaitableEvent::ResetPolicy::AUTOMATIC,
|
| + WaitableEvent::InitialState::NOT_SIGNALED);
|
| +
|
| + TimeDelta delay = TimeDelta::FromMicroseconds(900);
|
| + TimeTicks start = TimeTicks::Now();
|
| + ev.TimedWait(delay);
|
| + EXPECT_GE(TimeTicks::Now() - start, delay);
|
| +}
|
| +
|
| } // namespace base
|
|
|