mirror of
https://github.com/dashpay/dash.git
synced 2024-12-30 14:25:53 +01:00
Assert that what might look like a possible division by zero is actually unreachable
This commit is contained in:
parent
02e5308c1b
commit
db07f91899
@ -92,6 +92,8 @@ bool benchmark::State::KeepRunning()
|
|||||||
|
|
||||||
--count;
|
--count;
|
||||||
|
|
||||||
|
assert(count != 0 && "count == 0 => (now == 0 && beginTime == 0) => return above");
|
||||||
|
|
||||||
// Output results
|
// Output results
|
||||||
double average = (now-beginTime)/count;
|
double average = (now-beginTime)/count;
|
||||||
int64_t averageCycles = (nowCycles-beginCycles)/count;
|
int64_t averageCycles = (nowCycles-beginCycles)/count;
|
||||||
|
Loading…
Reference in New Issue
Block a user