dcapwell commented on code in PR #4220:
URL: https://github.com/apache/cassandra/pull/4220#discussion_r2211037435
##########
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:
i think its trying to make sure each instance clock isn't 100% in-sync so
that they are different by some amount. I didn't go into too much detail as my
test is single node and i wanted to focus on operations that take 1ns... I
reverted the 1ns testing as that wasn't the issue i was facing.
--
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]