@@ -198,8 +198,6 @@ State::State(std::string name, IterationCount max_iters,
198198 max_iterations(max_iters),
199199#if defined(CODSPEED_SIMULATION) || defined(CODSPEED_WALLTIME)
200200 codspeed_ (codspeed),
201- #endif
202- #ifdef CODSPEED_WALLTIME
203201 resume_timestamp_(0 ),
204202#endif
205203 started_ (false ),
@@ -269,15 +267,15 @@ State::State(std::string name, IterationCount max_iters,
269267}
270268
271269void State::PauseTiming () {
272- #ifdef CODSPEED_WALLTIME
270+ #if defined( CODSPEED_WALLTIME) || defined(CODSPEED_SIMULATION)
273271 uint64_t pause_timestamp = measurement_current_timestamp ();
274272#endif
275273
276274 // Add in time accumulated so far
277275 BM_CHECK (started_ && !finished_ && !skipped ());
278276 timer_->StopTimer ();
279277
280- #ifdef CODSPEED_WALLTIME
278+ #if defined( CODSPEED_WALLTIME) || defined(CODSPEED_SIMULATION)
281279 if (!is_warmup_ && resume_timestamp_ != 0 ) {
282280 measurement_add_benchmark_timestamps (resume_timestamp_, pause_timestamp);
283281 resume_timestamp_ = 0 ;
@@ -306,7 +304,7 @@ void State::ResumeTiming() {
306304 perf_counters_measurement_->Start ();
307305 }
308306
309- #ifdef CODSPEED_WALLTIME
307+ #if defined( CODSPEED_WALLTIME) || defined(CODSPEED_SIMULATION)
310308 BM_CHECK (resume_timestamp_ == 0 );
311309 resume_timestamp_ = measurement_current_timestamp ();
312310#endif
0 commit comments