     send_seq ++;
            ws.send(arr);
            sent++;

            showStats();
            send_ref = setTimeout(sendMsg, actualSendDelay);
        }

        function showStats() {
            $D('sent').innerHTML     = sent;
            $D('received').innerHTML = received;
            $D('laverage').innerHTML = laverage.toFixed(2);
            $D('lrunning').innerHTML = lrunning.toFixed(2);
            $D('lmin').innerHTML     = lmin.toFixed(2);
            $D('lmax').innerHTML     = lmax.toFix