speedmeter: Convert bytes to bits.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 5 Jan 2014 13:59:24 +0000 (14:59 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 5 Jan 2014 13:59:24 +0000 (14:59 +0100)
I assumed that it was computes in bits (hence the variable names).

html/html/themes/ipfire-new/include/js/refreshInetInfo.js

index f17b50a9a72ad4e357389495271f698e1ed1b35b..259f86e070f725d52cf042d357e983a6ea2dc949 100644 (file)
@@ -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) {