From: Michael Tremer Date: Sun, 5 Jan 2014 13:59:24 +0000 (+0100) Subject: speedmeter: Convert bytes to bits. X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=commitdiff_plain;h=926241aea24a60dce858c863aac39d6be83b23df speedmeter: Convert bytes to bits. I assumed that it was computes in bits (hence the variable names). --- diff --git a/html/html/themes/ipfire-new/include/js/refreshInetInfo.js b/html/html/themes/ipfire-new/include/js/refreshInetInfo.js index f17b50a9a..259f86e07 100644 --- a/html/html/themes/ipfire-new/include/js/refreshInetInfo.js +++ b/html/html/themes/ipfire-new/include/js/refreshInetInfo.js @@ -28,14 +28,14 @@ function refreshInetInfo() { var rxb_diff = rxb_current - rxb_last; rxb_last = rxb_current; - var rx_bits = rxb_diff * 1024 / t_diff; + var rx_bits = rxb_diff * 8192 / t_diff; var rx_fmt = format_bytes(rx_bits); txb_current = $("txb", xml).text(); var txb_diff = txb_current - txb_last; txb_last = txb_current; - var tx_bits = txb_diff * 1024 / t_diff; + var tx_bits = txb_diff * 8192 / t_diff; var tx_fmt = format_bytes(tx_bits); if (t_last != 0) {