diff --git a/lib/core/topologies/replset.js b/lib/core/topologies/replset.js index 3e1520ab50..690cf2615b 100644 --- a/lib/core/topologies/replset.js +++ b/lib/core/topologies/replset.js @@ -415,10 +415,10 @@ var pingServer = function(self, server, cb) { // Calculate latency var latencyMS = new Date().getTime() - start; + // Set the last updatedTime - var hrTime = process.hrtime(); - // Calculate the last update time - server.lastUpdateTime = hrTime[0] * 1000 + Math.round(hrTime[1] / 1000); + var hrtime = process.hrtime(); + server.lastUpdateTime = (hrtime[0] * 1e9 + hrtime[1]) / 1e6; // We had an error, remove it from the state if (err) {