Skip to content

Commit

Permalink
Merge pull request BVLC#807 from qipeng/dev
Browse files Browse the repository at this point in the history
relaxed timer test requirements
  • Loading branch information
jeffdonahue committed Jul 28, 2014
2 parents 94fb4eb + ff7d10e commit 2a23ead
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/caffe/test/test_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ TYPED_TEST(BenchmarkTest, TestTimerMilliSeconds) {
EXPECT_FALSE(timer.has_run_at_least_once());
timer.Start();
usleep(300 * 1000);
EXPECT_GE(timer.MilliSeconds(), 295);
EXPECT_LE(timer.MilliSeconds(), 305);
EXPECT_GE(timer.MilliSeconds(), 290);
EXPECT_LE(timer.MilliSeconds(), 310);
EXPECT_TRUE(timer.initted());
EXPECT_FALSE(timer.running());
EXPECT_TRUE(timer.has_run_at_least_once());
Expand All @@ -78,8 +78,8 @@ TYPED_TEST(BenchmarkTest, TestTimerSeconds) {
EXPECT_FALSE(timer.has_run_at_least_once());
timer.Start();
usleep(300 * 1000);
EXPECT_GE(timer.Seconds(), 0.295);
EXPECT_LE(timer.Seconds(), 0.305);
EXPECT_GE(timer.Seconds(), 0.290);
EXPECT_LE(timer.Seconds(), 0.310);
EXPECT_TRUE(timer.initted());
EXPECT_FALSE(timer.running());
EXPECT_TRUE(timer.has_run_at_least_once());
Expand Down

0 comments on commit 2a23ead

Please sign in to comment.