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

Unified Diff: webrtc/modules/utility/source/process_thread_impl_unittest.cc

Issue 1415923010: Several Tick counter improvements. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixup unittests that always assumed ::Now returned nonzero result. Created 5 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
« no previous file with comments | « no previous file | webrtc/system_wrappers/include/tick_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/utility/source/process_thread_impl_unittest.cc
diff --git a/webrtc/modules/utility/source/process_thread_impl_unittest.cc b/webrtc/modules/utility/source/process_thread_impl_unittest.cc
index 34ed5c5a3845ddbd5adc2939f2136e512d0105a2..e1edd6ad96fad3033d9e7e7cffd52bd21ad1180c 100644
--- a/webrtc/modules/utility/source/process_thread_impl_unittest.cc
+++ b/webrtc/modules/utility/source/process_thread_impl_unittest.cc
@@ -253,6 +253,12 @@ TEST(ProcessThreadImpl, WakeUp) {
MockModule module;
int64_t start_time = 0;
pbos-webrtc 2015/11/12 11:55:41 Shouldn't you initialize these to -1 and update th
noahric 2015/11/12 18:10:15 I think we should actually just the startTime != s
int64_t called_time = 0;
+
+ // On Mac, timestamps start at 0 the first time TickTime::Foo is called.
+ // Let this increment a very small amount before comparing our elapsed times.
+ (void)TickTime::MillisecondTimestamp();
+ started->Wait(10);
+
// 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.
« no previous file with comments | « no previous file | webrtc/system_wrappers/include/tick_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698