We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cee1a6b commit fa538efCopy full SHA for fa538ef
1 file changed
src/main/com/mongodb/ReplicaSetStatus.java
@@ -251,11 +251,11 @@ synchronized void update(){
251
252
synchronized void update(Set<Node> seenNodes){
253
try {
254
- long start = System.currentTimeMillis();
+ long start = System.nanoTime();
255
CommandResult res = _port.runCommand( _mongo.getDB("admin") , _isMasterCmd );
256
boolean first = (_lastCheck == 0);
257
- _lastCheck = System.currentTimeMillis();
258
- float newPing = _lastCheck - start;
+ _lastCheck = System.nanoTime();
+ float newPing = (_lastCheck - start) / 1000000F;
259
if (first)
260
_pingTime = newPing;
261
else
0 commit comments