Called by each thread
| 28 | |
| 29 | // Called by each thread |
| 30 | void StopTimer() { |
| 31 | BM_CHECK(running_); |
| 32 | running_ = false; |
| 33 | real_time_used_ += ChronoClockNow() - start_real_time_; |
| 34 | // Floating point error can result in the subtraction producing a negative |
| 35 | // time. Guard against that. |
| 36 | cpu_time_used_ += |
| 37 | std::max<double>(ReadCpuTimerOfChoice() - start_cpu_time_, 0); |
| 38 | } |
| 39 | |
| 40 | // Called by each thread |
| 41 | void SetIterationTime(double seconds) { manual_time_used_ += seconds; } |
no test coverage detected