From ff7d10e3f509ef061d54c23c84aa9ed08757ad4a Mon Sep 17 00:00:00 2001 From: qipeng Date: Sun, 27 Jul 2014 15:52:59 -0700 Subject: [PATCH] relaxed timer test requirements --- src/caffe/test/test_benchmark.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/caffe/test/test_benchmark.cpp b/src/caffe/test/test_benchmark.cpp index 6555b270ec4..fe0cc82a1d8 100644 --- a/src/caffe/test/test_benchmark.cpp +++ b/src/caffe/test/test_benchmark.cpp @@ -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()); @@ -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());