Browse Source

Assert that what might look like a possible division by zero is actually unreachable

0.15
practicalswift 8 years ago
parent
commit
db07f91899
  1. 2
      src/bench/bench.cpp

2
src/bench/bench.cpp

@ -92,6 +92,8 @@ bool benchmark::State::KeepRunning() @@ -92,6 +92,8 @@ bool benchmark::State::KeepRunning()
--count;
assert(count != 0 && "count == 0 => (now == 0 && beginTime == 0) => return above");
// Output results
double average = (now-beginTime)/count;
int64_t averageCycles = (nowCycles-beginCycles)/count;

Loading…
Cancel
Save