The time#clock test has been a bit flaky.
Bump our expectation up to <5ms.
Test: treehugger
Change-Id: Ic1a704043efb55fc295482583fc7cc23d18cfbf4
diff --git a/tests/time_test.cpp b/tests/time_test.cpp
index c890358..4e17242 100644
--- a/tests/time_test.cpp
+++ b/tests/time_test.cpp
@@ -748,11 +748,11 @@
}
TEST(time, clock) {
- // clock(3) is hard to test, but a 1s sleep should cost less than 1ms.
+ // clock(3) is hard to test, but a 1s sleep should cost less than 5ms.
clock_t t0 = clock();
sleep(1);
clock_t t1 = clock();
- ASSERT_LT(t1 - t0, CLOCKS_PER_SEC / 1000);
+ ASSERT_LT(t1 - t0, 5 * (CLOCKS_PER_SEC / 1000));
}
static pid_t GetInvalidPid() {