| 1230 | } |
| 1231 | |
| 1232 | void ValidateLapTime(TimerCounterTest* timer, int64_t expected_value) { |
| 1233 | int64_t stopwatch_value = timer->csw_.LapTime(); |
| 1234 | EXPECT_GE(stopwatch_value, expected_value - TimerCounterTest::MAX_TIMER_ERROR_NS); |
| 1235 | EXPECT_LE(stopwatch_value, expected_value + TimerCounterTest::MAX_TIMER_ERROR_NS); |
| 1236 | |
| 1237 | int64_t timer_value = timer->timercounter_.LapTime(); |
| 1238 | EXPECT_GE(timer_value, expected_value - TimerCounterTest::MAX_TIMER_ERROR_NS); |
| 1239 | EXPECT_LE(timer_value, expected_value + TimerCounterTest::MAX_TIMER_ERROR_NS); |
| 1240 | } |
| 1241 | |
| 1242 | TEST(TimerCounterTest, CountersTestOneThread) { |
| 1243 | TimerCounterTest tester; |