From 453bc7f72bd5c9fa879ac6ba9bcff2cb98014278 Mon Sep 17 00:00:00 2001 From: Adhidarma Hadiwinoto <me@adhisimon.org> Date: Tue, 1 Nov 2016 13:23:53 +0700 Subject: [PATCH] response time in two decimals behind --- matrix-util.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/matrix-util.js b/matrix-util.js index f163964..b82ae04 100644 --- a/matrix-util.js +++ b/matrix-util.js @@ -145,8 +145,9 @@ MatrixUtil.prototype._updateLastResponseTime = function(partner) { } let delta = Date.now() - Number(matrix.buddies[partner]['last_outgoing']['last_update_ts']); - logger.verbose('Response time in ' + delta + 'ms'); - matrix.buddies[partner]['last_response_time_in_secs'] = Math.round(delta/1000); + delta = delta / 1000; + logger.verbose('Response time in ' + delta + ' seconds'); + matrix.buddies[partner]['last_response_time_in_secs'] = Math.round(delta * 100) / 100; } MatrixUtil.prototype._updateLastMessage = function(partner, msg, direction) { -- 1.9.0