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

Unified Diff: base/time/time_win_unittest.cc

Issue 596103002: Fix more disabled MSVC warnings, base/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comment Created 6 years, 3 months 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 | « base/time/time_win.cc ('k') | base/win/scoped_process_information_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/time/time_win_unittest.cc
diff --git a/base/time/time_win_unittest.cc b/base/time/time_win_unittest.cc
index c6bb66cffa53d741182596b6038722fb5446b18c..058dfd79d147d6f6092bfc17680b1fc75a0583ff 100644
--- a/base/time/time_win_unittest.cc
+++ b/base/time/time_win_unittest.cc
@@ -121,7 +121,7 @@ TEST(TimeTicks, SubMillisecondTimers) {
bool saw_submillisecond_timer = false;
// Run kRetries attempts to see a sub-millisecond timer.
- for (int index = 0; index < 1000; index++) {
+ for (int index = 0; index < kRetries; index++) {
TimeTicks last_time = TimeTicks::HighResNow();
TimeDelta delta;
// Spin until the clock has detected a change.
@@ -170,10 +170,6 @@ TEST(TimeTicks, TimerPerformance) {
// Verify that various timer mechanisms can always complete quickly.
// Note: This is a somewhat arbitrary test.
const int kLoops = 10000;
- // Due to the fact that these run on bbots, which are horribly slow,
- // we can't really make any guarantees about minimum runtime.
- // Really, we want these to finish in ~10ms, and that is generous.
- const int kMaxTime = 35; // Maximum acceptible milliseconds for test.
typedef TimeTicks (*TestFunc)();
struct TestCase {
@@ -203,6 +199,7 @@ TEST(TimeTicks, TimerPerformance) {
// The reason to remove the check is because the tests run on many
// buildbots, some of which are VMs. These machines can run horribly
// slow, and there is really no value for checking against a max timer.
+ //const int kMaxTime = 35; // Maximum acceptible milliseconds for test.
//EXPECT_LT((stop - start).InMilliseconds(), kMaxTime);
printf("%s: %1.2fus per call\n", cases[test_case].description,
(stop - start).InMillisecondsF() * 1000 / kLoops);
@@ -271,4 +268,4 @@ TEST(TimeTicks, FromQPCValue) {
QPCValueToMicrosecondsSafely(qpc_value - 1, ticks_per_second));
EXPECT_EQ(expected_value,
TimeTicks::FromQPCValue(qpc_value - 1));
-}
+}
« no previous file with comments | « base/time/time_win.cc ('k') | base/win/scoped_process_information_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698