Several Tick counter improvements try #2."

This reverts commit c91d1738709b038fee84d569180cba2bbcbfe5d7.

BUG=

Review URL: https://codereview.webrtc.org/1452843003

Cr-Commit-Position: refs/heads/master@{#10682}
This commit is contained in:
thaloun
2015-11-17 15:02:44 -08:00
committed by Commit bot
parent c073615d56
commit 2935e01419
3 changed files with 98 additions and 143 deletions

View File

@ -251,8 +251,9 @@ TEST(ProcessThreadImpl, WakeUp) {
rtc::scoped_ptr<EventWrapper> called(EventWrapper::Create());
MockModule module;
int64_t start_time = 0;
int64_t called_time = 0;
int64_t start_time;
int64_t called_time;
// Ask for a callback after 1000ms.
// TimeUntilNextProcess will be called twice.
// The first time we use it to get the thread into a waiting state.
@ -281,8 +282,6 @@ TEST(ProcessThreadImpl, WakeUp) {
EXPECT_CALL(module, ProcessThreadAttached(nullptr)).Times(1);
thread.Stop();
ASSERT_GT(start_time, 0);
ASSERT_GT(called_time, 0);
EXPECT_GE(called_time, start_time);
uint32_t diff = called_time - start_time;
// We should have been called back much quicker than 1sec.