| Index: webrtc/base/fakeclock.cc
|
| diff --git a/webrtc/base/fakeclock.cc b/webrtc/base/fakeclock.cc
|
| index bcd720ff742f2687f6c0bb05c5e60672edec6314..e5aa3bc0a4fc3af0aecd8e58b395c54ce48f0d41 100644
|
| --- a/webrtc/base/fakeclock.cc
|
| +++ b/webrtc/base/fakeclock.cc
|
| @@ -27,24 +27,14 @@
|
| time_ = nanos;
|
| }
|
| // If message queues are waiting in a socket select() with a timeout provided
|
| - // by the OS, they should wake up and dispatch all messages that are ready.
|
| - MessageQueueManager::ProcessAllMessageQueues();
|
| + // by the OS, they should wake up to check if there are any messages ready to
|
| + // be dispatched based on the fake time.
|
| + MessageQueueManager::WakeAllMessageQueues();
|
| }
|
|
|
| void FakeClock::AdvanceTime(TimeDelta delta) {
|
| - {
|
| - CritScope cs(&lock_);
|
| - time_ += delta.ToNanoseconds();
|
| - }
|
| - MessageQueueManager::ProcessAllMessageQueues();
|
| -}
|
| -
|
| -ScopedFakeClock::ScopedFakeClock() {
|
| - prev_clock_ = SetClockForTesting(this);
|
| -}
|
| -
|
| -ScopedFakeClock::~ScopedFakeClock() {
|
| - SetClockForTesting(prev_clock_);
|
| + CritScope cs(&lock_);
|
| + SetTimeNanos(time_ + delta.ToNanoseconds());
|
| }
|
|
|
| } // namespace rtc
|
|
|