dcapwell commented on code in PR #4220:
URL: https://github.com/apache/cassandra/pull/4220#discussion_r2205932668
##########
test/simulator/main/org/apache/cassandra/simulator/systems/SimulatedTime.java:
##########
@@ -274,7 +274,7 @@ public long nanoTime()
nextDrift = nanosDriftSupplier.get(random);
from = global;
to = global + Math.max(baseDrift, nextDrift);
- diffPerGlobal = (nextDrift - baseDrift) / (double)(to - from);
+ diffPerGlobal = to == from ? 1 : (nextDrift - baseDrift) /
(double)(to - from);
Review Comment:
when i monkeyed with controlling time i hit this case... i wanted to test
the case where the full test ran unrealistically fast (each operation only took
1ns)...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]