mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-13 22:24:05 +01:00
Assert that what might look like a possible division by zero is actually unreachable
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user