Commit 453bc7f72bd5c9fa879ac6ba9bcff2cb98014278
1 parent
e857c8e699
Exists in
master
response time in two decimals behind
Showing 1 changed file with 3 additions and 2 deletions Side-by-side Diff
matrix-util.js
... | ... | @@ -145,8 +145,9 @@ MatrixUtil.prototype._updateLastResponseTime = function(partner) { |
145 | 145 | } |
146 | 146 | |
147 | 147 | let delta = Date.now() - Number(matrix.buddies[partner]['last_outgoing']['last_update_ts']); |
148 | - logger.verbose('Response time in ' + delta + 'ms'); | |
149 | - matrix.buddies[partner]['last_response_time_in_secs'] = Math.round(delta/1000); | |
148 | + delta = delta / 1000; | |
149 | + logger.verbose('Response time in ' + delta + ' seconds'); | |
150 | + matrix.buddies[partner]['last_response_time_in_secs'] = Math.round(delta * 100) / 100; | |
150 | 151 | } |
151 | 152 | |
152 | 153 | MatrixUtil.prototype._updateLastMessage = function(partner, msg, direction) { |