| 1219 | }; |
| 1220 | |
| 1221 | void ValidateTimerValue(const TimerCounterTest& timer, int64_t start) { |
| 1222 | int64_t expected_value = MonotonicStopWatch::Now() - start; |
| 1223 | int64_t stopwatch_value = timer.csw_.TotalRunningTime(); |
| 1224 | EXPECT_GE(stopwatch_value, expected_value - TimerCounterTest::MAX_TIMER_ERROR_NS); |
| 1225 | EXPECT_LE(stopwatch_value, expected_value + TimerCounterTest::MAX_TIMER_ERROR_NS); |
| 1226 | |
| 1227 | int64_t timer_value = timer.timercounter_.value(); |
| 1228 | EXPECT_GE(timer_value, expected_value - TimerCounterTest::MAX_TIMER_ERROR_NS); |
| 1229 | EXPECT_LE(timer_value, expected_value + TimerCounterTest::MAX_TIMER_ERROR_NS); |
| 1230 | } |
| 1231 | |
| 1232 | void ValidateLapTime(TimerCounterTest* timer, int64_t expected_value) { |
| 1233 | int64_t stopwatch_value = timer->csw_.LapTime(); |
no test coverage detected